GeneralScheduleHookOverviewUse this tool to create custom code for WordPress Cron Jobs using wp_schedule_event() function.UsageFill in the user-friendly form.Click the “Update Code” button.Copy the code to your project.Or save it as a snippet and share with the community.ExamplesIf you are still learning how to use this tool, check out the following examples:Daily Email NotificationDisable commenting on old postsFunction Name The function used in the code.Text Domain Translation file Text Domain. Optional.Timestamp Choose...GMT TimeLocal Time The first time you want the event to occur.Recurrence Choose...HourlyTwice DailyDailyCustom How often the event should reoccur.Create custom intervals using the "cron_schedules" filter in wp_get_schedules().Custom Recurrence Name Custom Recurrence Lable Custom Recurrence Interval Hook Name The name of an action hook to execute.Hook Arguments Comma separated list of arguments to pass to the hook function(s).Hook CodeCustom code to be executed. Update Code Save Snippet
// Schedule Cron Job Event function custom_cron_job() { if ( ! wp_next_scheduled( '' ) ) { wp_schedule_event( , '', '' ); } } add_action( 'wp', 'custom_cron_job' );