Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
This is on a SLES (Suse Linux Enterprise Server) 9 server.
We noticed a new cron job we put into place in /etc/cron.daily wasn't running. I then created a cron job via crontab -e to run every minute:
1 * * * * /usr/bin/touch /root/test.file
The file never gets created. I verified the cron daemon is running.
Any troubleshooting suggestions?
Thanks.
i got the entry in crontab -e working by changing the "1" to "*". However, nothing in cron.daily seems to be working. Is it possible to setup cron so it logs results for each cron job being run in cron.houry?
/var/log/cron will let you know if it got scheduld to run. If it did then /tmp/touch.log will let you know what happened when it tried.
Also I did a test with this on my Fedora Core 4 box and found it didn't kick off until cron.hourly ran (even though there is nothing in cron.hourly directory). It may be that Linux cron (unlike Unix cron) only updates the schedule once an hour. Your change to "*" in the first position may simply have happened just before the last hour mark so may not have been why it ran. Unfortunately I don't see anything in the crond or crontab man page to state this. Doing a sighup of crond didn't help nor did a stop and start of the service.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.