WordPress.org

Ready to get started?Download WordPress

Forums

Adjusting cron jobs (1 post)

  1. Steve
    Member
    Posted 4 years ago #

    I've worked out how to add a cron job.

    If I want to allow the user to change from the default (using a drop down list so they can't do anything silly) is the best way to unschedule it and then reschedule it?

    If I understand it properly to unschedule it I call wp_next_scheduled and pass in my hook. That returns the timestamp of the next run of my event and then I can then use that to call wp_unschedule_event

    Is that it? The documentation in the Codex is very minimal.

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags