Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include interval in update_cron_array massager's real key. #64

Closed
peterwilsoncc opened this issue Aug 25, 2018 · 1 comment
Closed

Include interval in update_cron_array massager's real key. #64

peterwilsoncc opened this issue Aug 25, 2018 · 1 comment

Comments

@peterwilsoncc
Copy link
Contributor

Cavalcade prevents the rescheduling of an existing job to a new frequency as the change in scheduling is not recognised.

Including the interval in the connector's real key will resolve the problem.

To reproduce the error, run the following:

$stamp = time() + HOUR_IN_SECONDS;
wp_schedule_event( $stamp, 'hourly', 'cavalcade_repeat' );
wp_schedule_event( $stamp, 'twicedaily', 'cavalcade_repeat' );

var_dump( _get_cron_array()[ wp_next_scheduled( 'cavalcade_repeat' ) ] );

The final line will show the job is scheduled to run hourly.

@peterwilsoncc
Copy link
Contributor Author

Fixed by #65

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant