View Full Version : Scheduled Jobs Not Running At Correct Time

December 4th, 2009, 02:54 AM

My scheduled jobs in Zrm Enterprise are not running at the correct time.

I believe this is an issue with timezones.

The timezone when I installed zrm was set to EDT when I noticed this I changed it to GMT. However all scheduled backups are still running 5hrs behind.

I tried editing /opt/zmanda/zrm/php/etc/php.ini


date.timezone = "GMT"

and then restarting zrm which has fixed dates for things like "User Date Created" but doesn't appear to have helped the backup schedule.

Does anyone have any suggestions or will I have to reinstall ZRM?



P.S. Sorry for posting in the wrong forum but I have only recently requested access.

December 4th, 2009, 08:35 AM
I recreated the backup set from scratch and I *think* that has fixed this issue.

I will post back to confirm when the next scheduled backup runs.

December 4th, 2009, 01:52 PM
Sorry ignore that, it is still broken.

Any help would be appreciated as I don't really want to have to reinstall.

December 4th, 2009, 02:02 PM
Please check the cron tab of the mysql user for the cron job which is in charge of the scheduling. This will execute the backups according to the system time.

December 6th, 2009, 07:21 AM
This is a little strange, I assume this must be a OS problem.

Everything appears to be set correctly but cron isn't calling the scheduled tasks at the correct time. Looking at the cron log its still 5hours out.

I will do some Googling on cron issues.




Sun Dec 6 16:19:08 GMT 2009

crontab -e -u mysql

# Crontab entries for mysql-zrm package

0 6 * * * /usr/bin/mysql-zrm --action purge
0 21 * * * /usr/bin/zrm-pre-scheduler --action backup --backup-set DailyRaw --backup-level 0 --interval daily
0 10 * * * /usr/bin/zrm-pre-scheduler --action backup --backup-set DailyRaw --backup-level 1 --interval daily
0 11 * * * /usr/bin/zrm-pre-scheduler --action backup --backup-set DailyRaw --backup-level 1 --interval daily
0 12 * * * /usr/bin/zrm-pre-scheduler --action backup --backup-set DailyRaw --backup-level 1 --interval daily
0 13 * * * /usr/bin/zrm-pre-scheduler --action backup --backup-set DailyRaw --backup-level 1 --interval daily
0 14 * * * /usr/bin/zrm-pre-scheduler --action backup --backup-set DailyRaw --backup-level 1 --interval daily
0 15 * * * /usr/bin/zrm-pre-scheduler --action backup --backup-set DailyRaw --backup-level 1 --interval daily
0 16 * * * /usr/bin/zrm-pre-scheduler --action backup --backup-set DailyRaw --backup-level 1 --interval daily
0 17 * * * /usr/bin/zrm-pre-scheduler --action backup --backup-set DailyRaw --backup-level 1 --interval daily
0 18 * * * /usr/bin/zrm-pre-scheduler --action backup --backup-set DailyRaw --backup-level 1 --interval daily
0 19 * * * /usr/bin/zrm-pre-scheduler --action backup --backup-set DailyRaw --backup-level 1 --interval daily
0 0 * * 7 /usr/bin/zrm-pre-scheduler --action backup --backup-set WeeklyLogical --backup-level 0 --interval weekly


Dec 6 13:01:01 s15370354 crond[2437]: (root) CMD (run-parts /etc/cron.hourly)
Dec 6 13:04:01 s15370354 crond[2439]: (root) CMD (/usr/local/psa/admin/sbin/backupmng >/dev/null 2>&1)
Dec 6 13:19:01 s15370354 crond[2442]: (root) CMD (/usr/local/psa/admin/sbin/backupmng >/dev/null 2>&1)
Dec 6 13:34:01 s15370354 crond[2445]: (root) CMD (/usr/local/psa/admin/sbin/backupmng >/dev/null 2>&1)
Dec 6 13:49:01 s15370354 crond[2450]: (root) CMD (/usr/local/psa/admin/sbin/backupmng >/dev/null 2>&1)
Dec 6 14:01:01 s15370354 crond[2453]: (root) CMD (run-parts /etc/cron.hourly)
Dec 6 14:04:01 s15370354 crond[2457]: (root) CMD (/usr/local/psa/admin/sbin/backupmng >/dev/null 2>&1)
Dec 6 14:19:01 s15370354 crond[2460]: (root) CMD (/usr/local/psa/admin/sbin/backupmng >/dev/null 2>&1)
Dec 6 14:34:01 s15370354 crond[2463]: (root) CMD (/usr/local/psa/admin/sbin/backupmng >/dev/null 2>&1)
Dec 6 14:49:01 s15370354 crond[2466]: (root) CMD (/usr/local/psa/admin/sbin/backupmng >/dev/null 2>&1)
Dec 6 15:00:01 s15370354 crond[2469]: (mysql) CMD (/usr/bin/zrm-pre-scheduler --action backup --backup-set DailyRaw --backup-level 1 --interval daily )
Dec 6 15:00:02 s15370354 crontab[2509]: (mysql) LIST (mysql)
Dec 6 15:00:02 s15370354 crontab[2512]: (mysql) REPLACE (mysql)
Dec 6 15:01:01 s15370354 crond[4502]: (mysql) RELOAD (cron/mysql)

December 6th, 2009, 11:02 AM
What OS/distribution are you using?

crontab uses server timezone. If you are using redhat, use redhat-config-date

or you set /etc/localtime link correctly.


December 7th, 2009, 03:06 AM
Thanks the problem was I hadn't restarted cron / rebooted the server since updating the time zone.

Backups are now running at the correct time.

I did have a problem this morning with the backup not showing under Reports-->Summary but they were running successfully according to Reports-->Events.

/etc/init.d/zmc_zrm restart

appears to have fixed that issue.



December 7th, 2009, 11:05 AM
Good to hear that timezone problems are resolved.

For the report issues, we probably have a patch. Please check Zmanda
Network downloads for the ZRM 3.1 patch 9203