Analytics schedule

Is there a way to have analytics run at a time of my choice? We have two DHIS2 servers – a tracker for certain programs (TB, etc.) and an aggregate instance that encompasses aggregate data for all national programs. We transfer data daily from certain program indicators on the tracker instance to data elements on the aggregate instance but would like all data captured that day on the tracker instance to be available on the aggregate instance following analytics. As I understand it, we need to transfer the data using the API after analytics runs on the tracker instance, though it will only be available on the aggregate instance a day later since analytics will have run already when the data is transferred, effectively meaning data will be available 2 days later.

Is there a good approach to solving this? Some thoughts I’ve had include forcing analytics an hour earlier by setting the server time back and then forward again in a cron job. Has anyone tried this?

1 Like

Hi Edward,
If you are using later versions of DHIS2 (I think 2.29 and above) you can schedule analytics to run as you would like with the built in scheduler app. See the docs.

Many people also use custom cron scripts to trigger analytics via the API. See the docs here.

Depending on how much data you have, and the speed of your machine, you should be able to run analytics much more frequently than once a day. Its possible to perform “partial” runs, which would only run analytics on data which is less than a year old for instance, but this too is configurable.

Best regards,

Jason

···

Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

1 Like

Jus to mention that the way we’ll tackle this is to run analytics earlier on the tracker instance via the API and turn off the scheduled analytics run.

Regards

Ed

···

From: Dhis2-users dhis2-users-bounces+erobinson=projectbalance.com@lists.launchpad.net On Behalf Of Edward Robinson

Sent: Monday, 05 November 2018 11:39 AM

To: dhis2-users dhis2-users@lists.launchpad.net

Subject: [Dhis2-users] Analytics schedule

Is there a way to have analytics run at a time of my choice? We have two DHIS2 servers – a tracker for certain programs (TB, etc.) and an aggregate instance that encompasses aggregate data for all national programs. We transfer data daily from certain program indicators on the tracker instance to data elements on the aggregate instance but would like all data captured that day on the tracker instance to be available on the aggregate instance following analytics. As I understand it, we need to transfer the data using the API after analytics runs on the tracker instance, though it will only be available on the aggregate instance a day later since analytics will have run already when the data is transferred, effectively meaning data will be available 2 days later.

Is there a good approach to solving this? Some thoughts I’ve had include forcing analytics an hour earlier by setting the server time back and then forward again in a cron job. Has anyone tried this?

1 Like

Apologies for the late response, I did not see your reply for some reason Jason. Great news on the built in scheduler app!
Cheers
Ed

1 Like