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

2 Answers 2

0

For D8/9 version of Ultimate cron. You can go to the listing of all cron jobs/queues (admin/config/system/cron/jobs). Then edit the perticular cron job you would want to setup time and select crontab from the dropdown and then add the time you want, you can check the rules there or from crontab guru. cron job settings

-2

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 and acknowledge you have read our privacy policy.

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