LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-16-2014, 02:39 PM   #1
linuxandtsm
Member
 
Registered: May 2011
Posts: 194

Rep: Reputation: Disabled
Issues running cron job


Hi All,

I want to run a script via crontab every 59 minutes everyday and this is the entry in the crontab.


59 * * * * /home/user/find_held_pbs_jobs.sh


This script should send an email when a condition is met. Somehow i do not get the email even if the condition is met when i run it from the crontab but it works when i run the script manually.

As the script runs perfectly fine when i run it manually, it is not the script issue but the cron job related issue. Where should i look for logs on this OR how to trace the issue?

Thanks in advance!

Last edited by linuxandtsm; 09-16-2014 at 02:47 PM.
 
Old 09-16-2014, 03:08 PM   #2
Habitual
LQ Addict
 
Registered: Jan 2011
Location: Youngstown, Ohio
Distribution: LM17.1/Xfce4.11.8
Posts: 7,158
Blog Entries: 10

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
show us the script?
sanitized of course.
 
Old 09-16-2014, 03:16 PM   #3
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,774
Blog Entries: 1

Rep: Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339
You typically have this problem when your crontab is not reading in your PATH from the environment. Ways to fix this include, adding PATH to your crontab,. or running the script in a 'login' shell with 'bash -l'.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cron job issues Alan87i Ubuntu 21 07-14-2011 03:49 AM
Cron Job is not running akshathajagadish Linux - Newbie 2 10-15-2009 08:21 PM
Cron job and postmap issues TheDude05 Linux - Server 3 08-09-2007 08:13 PM
cron job not running vincebs Linux - Software 34 10-30-2004 02:27 PM
Cron job not running? james_cwy Linux - Newbie 6 12-14-2003 09:24 PM


All times are GMT -5. The time now is 03:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration