admin管理员组文章数量:1335670
I have a plugin which I have deployed on four different websites. Part of that extension is a Cron job which triggers every hour.
On one of my deployments my job gets removed from the schedule. I used WP Control plugin to add it again (avoiding the reinstall of plugin). It worked for some time but then it was removed again.
I checked the logs and the removal of job from the schedule coincides with these other Cron jobs that were running at about that time wp_update_themes, wp_update_plugins, wp_version_check, woocommerce_cleanup_sessions
- Bellow is the list of the installed plugins:
- Advanced Custom Fields PRO
- Advanced Order Export For WooCommerce
- All In One SEO Pack
- Autoptimize
- Async JavaScript
- Complete Open Graph
- Custom Post Type UI
- Easy WP SMTP
- Disable Comments
- Gettext override translations
- Google Analytics Dashboard for WP (GADWP)
- Invisible reCaptcha
- iThemes Security
- WooCommerce
- WP Super Cache
- WP Crontrol
Is it possible that some these plugins is removing my Cron job from the scedule? What is causing this?
EDIT
This is how I add the Cron job in my init file of the plugin.
register_activation_hook(__FILE__, 'hourly_processing');
function hourly_processing() {
if (!wp_next_scheduled('process-subscriptions-hourly')) {
wp_schedule_event(time(), 'hourly', 'process-subscriptions-hourly');
}
}
add_action('process-subscriptions-hourly', 'process_subscriptions_hourly');
function process_subscriptions_hourly() {
//I do the processing here.
}
本文标签: pluginsCron task gets removed from the schedule
版权声明:本文标题:plugins - Cron task gets removed from the schedule 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742375990a2463173.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论