Sort jobs by weight

Created on 19 December 2014, over 10 years ago
Updated 8 January 2025, 3 months ago

Is there a way to specify which cron jobs should be executed first? Coming from Elysia Cron, this is a feature I miss.

For example:

/**
 * Implements hook_cronapi() from Ultimate Cron.
 */
function mymodule_cronapi($op, $job = NULL) {
  $items['mymodule_job_1'] = array(
    'rule' => '* * * * *',
    'weight' => 1,
  );
  $items['mymodule_job_2'] = array(
    'rule' => '* * * * *',
    'weight' => 0,
  );
  return $items;
}

In the scenario above, job 2 would execute before job 1. Is this currently possible? If not, would you consider a patch?

✨ Feature request
Status

Closed: outdated

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States joelstein

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡©πŸ‡°Denmark arnested

    I'm closing this since Drupal 7 is now unsupported and there will be no more development on the Drupal 7 branch of Ultimate Cron either.

    Thank you for taking the time and effort in reporting this issue, even though it never got resolved.

Production build 0.71.5 2024