![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Cron not working | manna | UNIX for Dummies Questions & Answers | 1 | 01-10-2008 02:04 PM |
| Cron not working? | christo16 | UNIX for Dummies Questions & Answers | 5 | 03-09-2007 02:55 AM |
| cron not working | DaleCabell | UNIX for Dummies Questions & Answers | 1 | 07-28-2006 07:16 PM |
| Cron job not working | janavenki | Shell Programming and Scripting | 7 | 03-10-2004 12:36 PM |
| CRON - How to tell it's working? | jaffy1229 | UNIX for Dummies Questions & Answers | 7 | 04-15-2002 12:09 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Cron job not working
Hello, I have the following crontab entry that does not seem to be running. When I check /var/cron/log, it is not there. Here is my os info:
SunOS birch 5.9 Generic_118558-09 sun4u sparc SUNW,Sun-Fire-V240 Here is the crontab entry: 01 21 * * * find /export/app/datafeed/flus/archive -mtime +5 -exec rm -r {} \; Any suggestions as to why it is not executing? Thank you. David |
|
||||
|
The files are owned by the same user in which the crontab entry is located. Shouldn't there be logging on /var/cron/log if it attempted to run? There may not have been files old enough to be deleted at the time it was run last.
David |
|
||||
|
test it by printing
For testing , U make one more entry in crontab to list those filenames which are modified morethan 5 days like this.
01 21 * * * find /export/app/datafeed/flus/archive -mtime +5 -print >$HOME/test.log U check whether test.log is created or not.if it is created means cron is working, otherwise not. |
|
||||
|
On just a point of style and manageability, I make my crontab entries call a single script, then have the script do all the fancy foot work.
1. it means I can simply add any tracing I need 2. it means I can test exactly the same thing outside of crontab 3. my crontab contains the minimum, eg when and what command |
![]() |
| Bookmarks |
| Tags |
| mtime |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|