Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
I have script jobs that run in cron, all of sudden these jobs do not run. If I run the scripts manually they work fine, so this is telling me that CRON is the issue.
What should I be looking for/how can I tell if something isnt right?
I have script jobs that run in cron, all of sudden these jobs do not run. If I run the scripts manually they work fine, so this is telling me that CRON is the issue.
What should I be looking for/how can I tell if something isnt right?
if I do a cron -l I do see my scripts in there.
If the jobs WERE running through cron just fine, and have stopped, then the cron daemon may be stopped. You don't say what version/distro of Linux you're using, but "/etc/init.d/cron status" (as root) will tell you. If it's stopped, try to start it, and check the status again. You may also want to check the system logs and cron logs, to see if anything caused it to stop.
redhat...im going to ask a noob question, how do I switch to root?
would I do..
1. su root
2. then type "/etc/init.d/cron status"
Yes, you could, or type in "sudo -s", or "sudo /etc/init.d/cron status".
Quote:
Originally Posted by eeps24
i typed "service crond status" and it says its running.
You might want to try to restart it.
You still don't say what version/distro of Linux you're using, if the cron jobs have ever worked, if you've seen anything in the logs, or if there have been any changes lately. All could be parts of the problem(s).
You still don't say what version/distro of Linux you're using, if the cron jobs have ever worked, if you've seen anything in the logs, or if there have been any changes lately. All could be parts of the problem(s).
redhat linux, not sure which version. The error log shows this....
/abc/v6.8/integrator/kshlib/setroot: line 19 /integrator/bin/abcsetenv: no such file or directory.
Line above this error is:
++ /integrator/bin/abcsetenv – root ksh
Also looks like an error to me:
/home/abc/bin/clean.sh line 83 cd: /server/logs: no such file or directory.
Errors should appear in /var/log/cron.
Note also that cron often emails the job owner or root if it has problems, so try 'mailx' as each of those users.
1) restart the crontab service
#service crond restart
2) check the user crontabl entry
#crontab -lu <user name>
if you are using suse linux then
The OP already said they were using Red Hat Linux, and the steps you posted were already suggested/tried. Please read the thread carefully before posting.
If there is an error during execution, Cron is sending it by email to root by default, but you can change it by adding a line like this to your crontab:
MAILTO=you@yourserver.com
It will probably end up in spam.
Another way is to read root's email locally via terminal, by installing an email client like Pine or Mutt, and running them as root.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.