General discussion

Locked

Crontab

By jaboy78 ·
i have 2 sun server running squid program.
i am using crontab to clear my cache server.

every 50 min

50 * * * * /myclearcache files

The first server is running smoothly
the second one not running..why??

i have ps -ef and check...both cron is running.

Can tell me wht exactly is the problem??

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
Thread display: Collapse - | Expand +

All Comments

Collapse -

by joematus In reply to Crontab

Your job is not running every 50 minutes it's running every hour when the clock hits 50 minutes after the hour. It's hard to tell what's going on without seeing the script "myclearcache files". What happens when you run the job manually from the command line? If it fails, that may give you clue as to what happened. Also check the mail of the user that runs the cron job with the mail command. The system usually will mail the user with an error messages of a cron job that failed. Another thing to check is the cron log. In solaris it's located in the file /var/cron/log -- see if there's anything in there.

Collapse -

by jaboy78 In reply to

Thanks for the cron log...the error is root ..no such user...but i have tht user...why is there still got this error??

If u solve my problem..i will give u the rate..
thanks

Collapse -

by ghislain.levesque In reply to Crontab

Is the perm on your script avec execute permission? Redirect the output in your crontab

50 * * * * /myclearcache files > /tmp/result.dat 2>&1

try to run it when login. You could use sh -x myclearcache files to see what's happening.

When it's running from the cron, is your PATH setup correctly...

It's hard to tell without knowing what the script is doing....

Good luck.

Collapse -

by jaboy78 In reply to

Poster rated this answer.

Collapse -

by theohkm In reply to Crontab

You should kill the cron process and restart cron.

Collapse -

by jaboy78 In reply to

Poster rated this answer.

Collapse -

by jaboy78 In reply to Crontab

This question was closed by the author

Back to Linux Forum
7 total posts (Page 1 of 1)  

Related Discussions

Related Forums