Delete thousands of cron jobs

Thanks Privateer for the prompt reply and advice. I found a way around it before I saw your answer. Here is a step-by-step method for deleting thousands of old cron jobs and may be of use to someone else. I logged on to phpMyAdmin. I clicked on my database and then the ‘search’ tab. I … Read more

Running WP Cron on multisite the right way

I think the best way is to use WP-CLI but you’d need to write a bash script to do this. Here is one that should do it for you: WP_PATH=”/path/to/wp” for SITE_URL in = $(wp site list –fields=domain,path,archived,deleted –format=csv –path=”$WP_PATH” | grep “,0,0$” | awk -F ‘,’ ‘{print $1 $2}’) do for EVENT_HOOK in $(wp … Read more

How to debug WordPress “Cron” wp_schedule_event

You can run WP cron manually by calling: http://example.com/wp-cron.php?doing_wp_cron If you don’t want the automatic cron to run while you’re debugging, then add this to your /wp-config.php file: define(‘DISABLE_WP_CRON’, true); If you’re on a development environment and want to output debug information, calling it manually like that will show you your debug output. Alternatively you … Read more

How to test wp_cron?

My favorite plugin for that is Core Control which has very nice module for display of what is going in the cron – which events are set up, when are they next firing, etc. On getting your hands dirty level see _get_cron_array(), which returns internal stored data for cron events (top level of keys are … Read more

CronJob not running

Finally I found the solution. Following is the solution:- Never use relative path in python scripts to be executed via crontab. I did something like this instead:-import os import sys import time, datetime CLASS_PATH = ‘/srv/www/live/mainapp/classes’ SETTINGS_PATH = ‘/srv/www/live/foodtrade’ sys.path.insert(0, CLASS_PATH) sys.path.insert(1,SETTINGS_PATH) import other_py_files Never supress the crontab code instead use mailserver and check the … Read more

Are There Any Cron Jobs Alternative?

Even though the question was posted a while ago, I just had the same problem but found a solution (based on Kissaki’s answer, thanks!) and thought I’d post it here for anyone still looking for a possible solution. Prerequisites: SSH access Python Code (python):