Mondo Cron Job not running
Hi All
I have installed Mondo Rescue on one of my Centos 5.8 servers and it works perfectly from command line with the following command: mondoarchive -Oi -d /home/mondo -E "/home/mondo" when i add this to crontab -e it will not run! in the cron logs it displays the following: Apr 12 10:53:01 backuptest crond[7036]: (root) CMD (root cd "/home/mondo"; ./backup.sh) Apr 12 10:53:01 backuptest crond[7035]: (root) MAIL (mailed 81 bytes of output but got status 0x0001 ) Apr 12 10:53:59 backuptest crontab[7255]: (root) LIST (root) Apr 12 10:55:01 backuptest crond[7370]: (root) CMD (root /home/mondo/backup.sh) there are no messages sent and all of the above is being run as root. I tried creating a simple script in /home/mondo but the script also doesnt run in cron, it does run manually: #!/bin/sh PATH=/usr/sbin:/usr/bin:/sbin:/bin mondoarchive -Oi -d /home/mondo -E "/home/mondo" Could anyone please shed some light on what it is im doing wrong please? Many thanks Dave |
What's the entry you made in crontab?
|
For this, it looks like the mailer has issues
Code:
Apr 12 10:53:01 backuptest crond[7035]: (root) MAIL (mailed 81 bytes of output but got status 0x0001 ) |
Hi Chris
There are no logs in /var/log/maillog I also copied the script to /etc/cron.daily however still does not run, is there anything else I could try? Many thanks Dave |
As above, show the exact crontab entry, also check /var/log/messages.
also, try mailx as root and see what if anything is in there |
Hi Chris
Thanks for the reply, the exact crontab entry is: [root@backuptest ~]# crontab -l 40 12 * * * root cd "/home/mondo"; ./backup.sh 42 12 * * * root /home/mondo/backup.sh 44 12 * * * root mondoarchive -Oi -d /home/mondo -E "/home/mondo" The times the job is run is not really in the equation I would like to run the job at midnight it was just to test during the day. Also the command mailx shows: [root@backuptest ~]# mailx -bash: mailx: command not found [root@backuptest ~]# I have tried all combinations of running the script and the actual command via cron, it seems to start the job but not actually execute it: Apr 15 12:40:01 backuptest crond[23695]: (root) CMD (root cd "/home/mondo"; ./backup.sh) Apr 15 12:40:01 backuptest crond[23694]: (root) MAIL (mailed 81 bytes of output but got status 0x0001 ) Apr 15 12:42:01 backuptest crond[23940]: (root) CMD (root /home/mondo/backup.sh) please dont pay much attention to the times as i keep changing the times in cron to try something else. I have also tried doing the "at" command as referenced: http://www.mondorescue.org/docs/mond...-solution.html however the at command followed by my normal command does not work as it doesnt like the -Oi or the -E in my command so im at a bit of a loss.... Many thanks Dave |
Quote:
|
The correct entry would be -
Quote:
|
Hi Satyaveer
Firstly thanks for the reply. To answer your questions: Do you want to run the backup.sh script? And do you want to run this mondoarchive -Oi -d /home/mondo -E "/home/mondo" command? Yes i want to run the command: mondoarchive -Oi -d /home/mondo -E "/home/mondo" I have already created the entries in crontab: 44 12 * * * mondoarchive -Oi -d /home/mondo -E "/home/mondo" however it does not work - i added the root before just in case it was a permissions thing even though the crontab entry was made under root, just a precaution really. Also just for reference, I only wrote the script as the command option wasnt working. I just tried the other cron entry you posted however still yet again nothing: (33 10 * * * sh /home/mondo/backup.sh) Apr 16 10:28:26 backuptest crontab[9916]: (root) LIST (root) Apr 16 10:28:33 backuptest crontab[9933]: (root) BEGIN EDIT (root) Apr 16 10:28:47 backuptest crontab[9933]: (root) REPLACE (root) Apr 16 10:28:47 backuptest crontab[9933]: (root) END EDIT (root) Apr 16 10:28:50 backuptest crontab[9983]: (root) LIST (root) Apr 16 10:29:01 backuptest crond[14639]: (root) RELOAD (cron/root) Apr 16 10:33:02 backuptest crond[10557]: (root) CMD (sh /home/mondo/backup.sh) Still no messages in /var/log/messages or in /var/log/maillog Totally stumped now and to be honest a tad annoying! :s Many thanks Dave |
First-of-all you please use CODE and QUOTE tags to differentiate the command and entries used by you, so that it looks meaningful, understandable and nice.
Now to your question - Quote:
Also same is the case with backup.sh script, run this script also on command line and see what you get. |
Hi Again
sorry for the QUOTE/CODE thing i didnt realise.... ok ran the command from the cli and got the following: Code:
mondoarchive -Oi -d /home/mondo -E "/home/mondo" next for the running of the script: Code:
cd /home/mondo Hope this is in a better format. Many thanks Dave |
You ran both the commands and that worked properly without any errors, right?
This time again try to schedule your cronjob with correct entries and see what happens. |
For backup.sh script you can make this entry as well -
Quote:
|
Hi Satyaveer
Ok so created a new crontab: Code:
[root@backuptest mondo]# crontab -l cron messages state: Code:
Apr 16 15:47:18 backuptest crontab[13869]: (root) BEGIN EDIT (root) Code:
[root@backuptest mondo]# crontab -l Code:
Apr 16 15:59:01 backuptest crond[14639]: (root) RELOAD (cron/root) Many thanks Dave |
Is the crond service running?
|
All times are GMT -5. The time now is 05:59 PM. |