Cron Job Is not running

6 views
Skip to first unread message

gerald thomas

unread,
Oct 29, 2018, 1:25:20 AM10/29/18
to dhis2-system-...@googlegroups.com
Dear All,
My backup Cron Job is not running and during my investigation i found out this:
root@dhis:/var/spool/cron/crontabs# cat hmis
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (- installed on Tue Jun 27 00:33:40 2017)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
@reboot CATALINA_BASE=/var/lib/dhis2/hmis /usr/bin/dhis2-startup hmis
20 19 * * * /usr/bin/dhis2-backup hmis
21 00 * * * /usr/sbin/logrotate -s /var/lib/dhis2/hmis/logrotate.status /var/lib/dhis2/hmis/logrotate.conf

Please can anyone help me with a fix for it because i can only manually do backups now.

--
Regards,
 
Gerald

Jasper Timm

unread,
Oct 29, 2018, 6:13:05 AM10/29/18
to gerald thomas, dhis2-system-...@googlegroups.com
Hey Gerald,

Is the backup job itself completing successfully? i.e. if you simply run '/usr/bin/dhis2-backup hmis' does it look fine?

If that is ok then you'd need to confirm it's properly in the crontab. You should be using the 'crontab' command for that, i.e.

crontab -l (to list the current jobs in the crontab)
crontab -e (to edit the jobs list in your editor)

Logs for cronjobs are most likely in /var/log/cron if you want to confirm it's running properly.

From the line you gave it looks like it's set up to run everyday at 7:20pm ?

Cheers,

- Jasper

--
You received this message because you are subscribed to the Google Groups "DHIS2 system administrators" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dhis2-system-admini...@googlegroups.com.
To post to this group, send email to dhis2-system-...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/dhis2-system-administrators/CA%2BthV3R9YntukOdodphEQiW5S1j4%3Df0yrsVKK9XuSdPx8-Z7rw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--

Jasper Timm

Lead Software Developer

eHealth Africa
4A Renner Drive
Off Wilkinson Road (behind Monoprix Supermarket)
Freetown, Sierra Leone

mobile +232 99891119

--

    

Reply all
Reply to author
Forward
0 new messages