Hi, I am having issues with my cron jobs not running on my VPS, running Cent OS 5.4 and Kloxo. The log shows the cron jobs are running, but there is no output from the jobs that should have it. it is not sending me the email either about the jobs when they run, like I set it up to do. If I run the command directly from my SSH client, it works like it is suppose to. any ideas of things to check? Thanks, michael
i just had it email me, cause I wanted to make sure it was working, but the cron jobs are not working. So, the fact it does not e-mail is okay, I guess. I just want it to run my cron jobs. I checked the cron denied user list, and it is blank, so i should be able to run cron jobs as an admin. I have one job set to run every 5 minutes, and one to run once a day, and none are working. michael
Try on simpler tasks. Add task "echo test > /home/username/test.txt" on every minute. Check if file created in a minute. If simple task work than problem not in cron. If its not work check if crond is running - ps ax | grep cron should print smth like "PID ? Ss 3:02 /usr/sbin/cron"
Thanks, I setup the test command, and there is no output to a file, and no file has been created. I did the other command from my SSH client, and got 18135 pts/0 S+ 0:00 grep cron 32575 ? Ss 0:01crond I checked the cron log in /var/log/cron, and there are lines that read Jan 8 20:31:01 servermi crond[24544]: (admin) CMD (echo test > /home/admin/test/txt) Jan 8 20:32:01 servermi crond[26404]: (admin) CMD (echo test > /home/admin/test/txt) Jan 8 20:33:01 servermi crond[5123]: (admin) CMD (echo test > /home/admin/test/txt) Jan 8 20:34:01 servermi crond[7244]: (admin) CMD (echo test > /home/admin/test/txt) Thanks, Michael
I just double checked several hundred lines of the cron log, and there were no errors, it is jus showing the commands that it is suppose to be running, but that are not getting ran. I can run the exact command for my ssh client, and it works fine, and the log shows the cron running it every minute, or 10 minutes, depending on the schedule. Thanks, Michael
Hello, You can follow this step by step, and see whether it works: - Log in with root user using SSH - Enter "crontab -e" (no quotes), this will open text INSERT editor to edit your root crontab - Press Insert (this will change text editor into insert mode) - Enter "* * * * * echo 'test' > /test.txt" (no dbl quotes), then Esc, then :X Your crontab has been saved. You can now check whether test.txt is there, and its last modified time is changed every minute. If you don't see any change within next minutes, try creating test.txt, then chmod test.txt into 0777. I think the problem is your cron jobs aren't run as root. If the instructions above works, create your cron jobs there. If it still doesn't work, go /etc/cron.d, create a file, e.g crontab, then Enter YOUR_TIME root YOUR_COMMAND e.g. * * * * * root echo 'test' > /test.txt After done, run "service crond restart" (using SSH or any command line tool). Hope it helps Best regards, Nguyen @ SetCronJob.
Thanks, things did work in the root cron, but not the admin cron. But it is all working now. I had to rebuild my VPS do to other issues I was having. Doubt I iwll ever know what was causing it. I know a lot of problems started when i did Yum updates. Michael