• Currently in one of my wordpress plugins there is a cron which runs as per schedule below.
    wp_schedule_event( time(), ‘hourly’, ‘w4pr_cron’ );
    I would like to change this to run every 5 minutes in a particular time range.

    For E.g. The current code as you know will run once every hour in a day. (24 runs in a day). I would like this to run every 5 minutes between 5:00am and 6:30am (EST) only (18 runs in a day).

    Any help appreciated!

    Thanks
    Thomas

Viewing 1 replies (of 1 total)
  • What is the nature of your function? In other words, does it have to run 18 times in a span of 1.5 hours (at what seems to be an off-peak time) -OR- could it just run once?

    The reason I ask is, there doesn’t appear to be a stop time parameter for wp_schedule_event … but a good alternative might be wp_schedule_single_event.

Viewing 1 replies (of 1 total)
  • The topic ‘Customizing the WP Schedule event’ is closed to new replies.