WordPress.org

Ready to get started?Download WordPress

Forums

WordPress 2.1: Cron (6 posts)

  1. Lester Chan
    Member
    Posted 7 years ago #

    Is there any examples out there on to use it for plugins? I cant seem to find any.

  2. carjunky
    Member
    Posted 7 years ago #

    I would also be interested in an example... anyone?

  3. Chris_K
    Member
    Posted 7 years ago #

    The new wp-db-backup uses it.
    http://www.ilfilosofo.com/blog/wp-db-backup

  4. Lester Chan
    Member
    Posted 7 years ago #

    i manage to get it to work on wp-polls =)

    http://www.lesterchan.net/wordpress/readme/wp-polls.html

  5. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    If you look at the functions in wp-includes/cron.php, it seems fairly obvious as to how to use it.

    $timestamp will be a timestamp as returned by any of the php time functions.
    $hook would be the name of an action hook you want triggered at that time.
    $args would be arguments you want passed to your functions.
    $recurrance appears to be either 'hourly' or 'daily'.

    You can call functions to set one time events, to set recurring events, to change schedules for recurring events, to unset events entirely, to find out when recurring events are going to be run, etc.

  6. leemon
    Member
    Posted 7 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags