Job Expiry & Expired Job Deletion Not Working
-
JOB EXPIRY:
The status of expired Jobs updates to expired ONLY if I disable and then re-enable the WP Job Manager plugin.EXPIRED JOB DELETION:
I have added the following code to my theme’s functions.php file:// This will make sure expired jobs are deleted after XX days add_filter( 'job_manager_delete_expired_jobs', '__return_true' ); // The default is 30 days, but you can change this with the following add_filter( 'job_manager_delete_expired_jobs_days', 'change_job_manager_delete_expired_jobs_days' ); function change_job_manager_delete_expired_jobs_days() { return 30; // change this to the number of days you desired }
Expired jobs are not deleting automatically.
Expired jobs are not deleting if I disable and then re-enable the WP Job Manager plugin.When I look at the list of Cron Events using the WP Crontrol plugin, I don’t see “job_manager_delete_expired_jobs”.
Here are the WP Job Manager actions that I do see in the list of cron events:
job_manager_check_for_expired_jobs
job_manager_verify_no_errors
job_manager_clear_expired_transients
job_manager_delete_old_previewsQ1. Why aren’t the statuses of expired jobs automatically being set to expired?
Q2. Why isn’t “job_manager_delete_expired_jobs” showing in the list of cron events?
- The topic ‘Job Expiry & Expired Job Deletion Not Working’ is closed to new replies.