Quantcast
Channel: Active questions tagged cron - Drupal Answers
Viewing all articles
Browse latest Browse all 37

Using Ultimate cron to set a specific time to run a function of module, but it is not working as expected

$
0
0

I have set ultimate cron job time once a day but it works at every hour because another default site cron is running every hour.

This code is working on production but not according to crontab time i.e once in a day. It is working every hour, i checked cron job list on acquia server there is one cron job set named "site cron" which is running every hour.

Code:

/** * Implements hook_cronapi(). */function demo_cronapi($op, $job = NULL) {  $items['monitor_run'] = ['description' => 'Post Solution','scheduler' => ['name' => 'simple','simple' => ['rules' => ['0' => '0 7 * * *'],      ],    ],  ];  return $items;}/** * Trigger event to generate report. */function monitor_run($job) {  // logic code.}

Viewing all articles
Browse latest Browse all 37

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>