Good morning/evening everyone.
I'm facing a little problem here.
I have a perl script which I use to backup my DB (a large db).
(I run it via crontab)..
and sometime it crushing mysql server.
so I want to do the following.
1- stop apache service (to stop any http sql requests)..
2- run the backup script.
3- restart mysql to make sure that it'll run smoothly.
4- start apache service.
I have added the following to my crontab file
Code:
MAILTO=my@mail.com
0 0 * * * /etc/init.d/apache2 stop
1 0 * * * perl /var/path/to/my/backup/script
4 0 * * * /etc/init.d/mysql restart
5 0 * * * /etc/init.d/apache2 start
the backup script runs at time just fine, the same for mysql restarting command..
but the apache command is not executed..
please tell me what do I miss?