Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cron job nor running

Status
Not open for further replies.

hyy1109

IS-IT--Management
Dec 16, 2002
27
US
1. Here is my cron file called mytab:
05 11 * * 0-5 . test_cron.urs

2. Both mytab and test_cron.urs have 744 permission.

3. Then I register the cron job:
crontab mytab

But, the cron job nor running.

Now, the following cron job does run to create a directory called test_cron. Please help.
10 11 * * 0-5 mkdir test_cron
 
Try putting in the entire path for "test_cron.urs". Also check the /var/cron/log file and the cron user's email for more details as to why it failed.
 
This is what the /var/cron/log says, still don't have a clue.

> CMD: . /export/home/ogdwload/test_cron.urs
> ogdwload 4876 c Mon Jan 10 11:49:00 2005
< ogdwload 4876 c Mon Jan 10 11:49:00 2005 rc=1
 
I take it you can run this from the command line with no problem? If that's the case, it's possible an environment issue - make sure appropriate PATH variables etc are set within the script. I think this is the first time I've seen a . (period) within a cron script, so whether that makes a difference I can't say.
 
I think the cron entry is incorrect. If you are using:

05 11 * * 0-5 . test_cron.urs

You need to remove the "." and give the full path to the executable:

05 11 * * 0-5 /<path_to_executable>/test_cron.urs
 
Yes, splitting10 that was part of the problem. There are some others. But, the debug told me all. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top