A custom action plugin of the Task Scheduler WordPress plugin.
<?php | |
/** | |
* Plugin Name: Task Scheduler - Sample Action | |
* Plugin URI: http://en.michaeluno.jp/ | |
* Description: Uses a custom action with Task Scheduler. | |
* Author: Michael Uno | |
* Author URI: http://michaeluno.jp | |
* Version: 1.0.0 | |
*/ | |
/** | |
* Called when the Task Scheduler plugin gets loaded. | |
*/ | |
function doMyCustomAction( $sExitCode, $oRoutine ) { | |
/** | |
* Do you stuff here. | |
*/ | |
TaskScheduler_Debug::log( $oRoutine->getMeta() ); | |
return 1; | |
} | |
/** | |
* Set the`my_custom_action` custom action slug in the Select Action screen | |
* via Dashboard -> Task SCheduler -> Add New Task. | |
*/ | |
add_filter( 'my_custom_action', 'doMyCustomAction', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
I would like a working example please. I would like to have a task.php scheduled at 24:00 every day