• Resolved lcf

    (@lcf)


    How to change the time for the plugin scheduled jobs (cronjob)?

    `Atum\Components\AtumQueues::update_expiring_product_props_action
    Atum\Inc\Helpers::update_order_item_product_data`

    I have a large WooCommerce store. The jobs run at the noon which causes high server load. I would like it to run in the midnight.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Salva Machi

    (@salvamb)

    Hi Liew,

    That CRON job is supposed to be running at midnight and not at noon. Perhaps your server’s timezone is around 12 hours behind your local timezone?

    Anyway, you can use a filter to edit the time and frequency when this is executed. Something like this should work:

    add_filter( 'atum/queues/recurring_hooks', function($recurring_hooks) {
        $recurring_hooks['atum/update_expiring_product_props']['time'] = 'midnight tomorrow';
    
      return $recurring_hooks;
    } );

    Please, note that the ‘midnight tomorrow’ it’s the value that we use by default. You can change it to whatever value recognized by the strtotime function (https://www.php.net/manual/en/function.strtotime.php).

    I hope this helps.

    Best Regards,
    Salva.

    Thread Starter lcf

    (@lcf)

    thanks for the prompt reply. The server time is indeed not set to the local timezone. I have updated the server time. Let’s see does it solve the issue or not, else I will use the snippet.

    Plugin Author Salva Machi

    (@salvamb)

    Perfect!
    Just let us know if you find any other issue.

    Best Regards,
    Salva.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘change schedule jobs time’ is closed to new replies.