Add and remove Cron job in WordPress easily!
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


License Downloads

Add and remove Cron job in WordPress easily!


composer require wpbp/cronplus:dev-master

composer-php52 supported.


$args = array(
    // to execute at a specific time based on recurrence
    'time' => '18:00:00', // not mandatory, will use the current time
    // hourly, daily, twicedaily, weekly, monthly or timestamp for single event
    'recurrence' => 'hourly',
    // schedule (specific interval) or single (at the time specified)
    'schedule' => 'schedule',
    // Name of the Cron job used internally
    'name' => 'cronplusexample',
    // Callback to execute when the cron job is launched
    'cb' => 'cronplus_example',
    // Multisite support disabled by default
    'multisite'=> false,
    // Used on deactivation for register_deactivation_hook to cleanup
    'plugin_root_file'=> '',
    // When the event is scheduled is also executed 
    'run_on_creation'=> false,
    // Args passed to the hook executed during the cron
    'args' => array( get_the_ID() )

function cronplus_example( $id ) {
	echo $id;

$cronplus = new CronPlus( $args );
// Schedule the event
// Remove the event by the schedule
// Jump the scheduled event