All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Crons not running
I wonder if someone might be able to help me..
I'm running CentOS 5.9. If I look in the cron log, I can see that the cron.hourly is being executed with run-parts every hour. Great. Now, I write a small script to run some backups and place it in there (mysqldump in a for loop and a tarsnap). It is executable by everyone and completes in a few seconds when I run it manually.
I wait a few hours and can see it hasn't been run at all since I ran it manually. I check the cron log and messages, and there's nothing in either of them, although I can see run-parts is still running every hour. I ran run-parts manually and it backs up fine.
Any ideas why it isn't running automatically every hour?
Comments
paste the logs and cron script?
Google might be able too......
Sounds like you need a Cron-As-A-Service
https://www.setcronjob.com/
Backup script:
Cron log:
Did you chmod it to be executable? Did you include the right interpreter as hashbang?
Google you SAY!?
Have you made sure your using the full path/to/mysqldump or including it as an environment variable.
Have you tried restarting cron after adding mysqldump? (lack of errors means its not trying to execute it at all)
Paste your crontab
Service cron restart ?
@Frost & @netomx Yes I did
@WebSearchingPro trying it now
@joelgm:
Is run-parts the name of your script?
Try replacing it with
/bin/bash /root/run-parts /etc/cron.hourly
. I dont know what the coloumn root is doing there. On Debian, the correct line would be:42 4 1 * * /bin/bash /root/run-parts /etc/cron.monthly
for the last line. I havent really delved into the cron man pages to a deep level, but that line should work on Debian at least. Change the path accordingly. If you prefix it with bash, the script does not even need to be executable.I think you mean
No?
Have you tried to put a simple: echo 0 > /root/myfile to Check if The script really works? Maybe it is executing but it may not find something and exits
Use the correct path of run-parts, whatever it is.
Cool it's working now. I guess I just needed to add the paths to the commands in the script.
root should've been getting emails with the 'command not found' error(s)
Sweet Its always something simple when we think its something all complicated.
That's why you begin bash-scripts with
Never a truer statement!
run-parts doesn't work with scripts that contain a period in their name. Just putting it out there in case someone else finds this thread.