-
Notifications
You must be signed in to change notification settings - Fork 26
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
Fixed scheduler time issue #1047
Conversation
@girishpanchal30 @HardeepAsrani, I installed These PRs: And manually aplied this fix from current PR. The behavior changed that now I don't see import job next run time at all: And running feedzy_cron Event: Doesn't trigger the import jobs: Does it work for you? |
@vytisbulkevicius Can you check now? |
@girishpanchal30 @vytisbulkevicius @HardeepAsrani this has already been fixed by me here 21e3b69, which is on dev. Also this was not fixing the inconsistency with is_scheduled function @HardeepAsrani, the original method you developed is returning either true false or a timestamp based on the environment, it should return only false or a timestamp. |
The public static function is_scheduled( string $hook, array $args = array() ) {
- if ( function_exists( 'as_has_scheduled_action' ) ) {
- return as_has_scheduled_action( $hook, $args );
- }
-
- if ( function_exists( 'as_next_scheduled_action' ) ) {
- // For older versions of AS.
- return as_next_scheduled_action( $hook, $args );
- }
-
- return wp_next_scheduled( $hook, $args );
+ return self::get_next( $hook, $args );
} |
yes, thats exactly what is_scheduled is doing atm in my fix. |
I've checked with dev and it seems the incorrect time is being displayed. With this PR, the correct time is displayed. Should I update the |
We dont need any next method, the is scheduled is enough. |
@selul Okay, In this case, we don’t need to merge this PR. Please close this PR when you can. |
Summary
Improve scheduler util class
Check before Pull Request is ready:
Closes #827