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.
}
0

Set your crontab to wget/curl cron.php once per minute (* * * * *).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.