I am trying to schedule a backup using cron jobs as described here .
The cron tasks are started, but, unfortunately, do not execute the command inside it.
This is my schedule.rb file
every 1.minute do
command "backup perform -t my_backup"
end
What translates to this cron file:
# Begin Whenever generated tasks for: /home/roy/Backup/config/schedule.rb
* * * * * /bin/bash -l -c 'backup perform -t my_backup'
# End Whenever generated tasks for: /home/roy/Backup/config/schedule.rb
Cron tasks start every minute (I see this by running grep CRON /var/log/syslog). These are my last cron jobs:
Mar 20 21:48:01 roybuntu CRON[18041]: (roy) CMD (/bin/bash -l -c 'backup perform -t my_backup')
Mar 20 21:48:01 roybuntu CRON[18040]: (roy) MAIL (mailed 37 bytes of output but got status 0x004b from MTA
Mar 20 21:49:01 roybuntu CRON[18063]: (roy) CMD (/bin/bash -l -c 'backup perform -t my_backup')
Mar 20 21:49:01 roybuntu CRON[18062]: (roy) MAIL (mailed 37 bytes of output but got status 0x004b from MTA
I also installed postfix because I previously received the “No MTA” error messages in the above example. However, this cannot be fixed.
Anyone familiar with this problem and / or know how to fix it?
EDIT:
Also, running the cron file as root does not work. I used sudo crontab -eto edit the root cron file.
grep CRON /var/log/syslog crontab:
Mar 21 19:36:01 roybuntu CRON[9387]: (root) CMD (/bin/bash -l -c 'backup perform -t my_backup')
Mar 21 19:36:01 roybuntu CRON[9388]: (roy) CMD (/bin/bash -l -c 'backup perform -t my_backup')
Mar 21 19:36:01 roybuntu CRON[9385]: (roy) MAIL (mailed 37 bytes of output but got status 0x004b from MTA
Mar 21 19:36:01 roybuntu CRON[9386]: (root) MAIL (mailed 90 bytes of output but got status 0x004b from MTA