• Resolved johpg

    (@johpg)


    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_previews

    Q1. 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?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor jonryan

    (@jonryan)

    Are you still having an issue with this?

    job_manager_delete_expired_jobs is the hook and not the cron event. You seem to have the correct events listed. What happens if you run those events from the WP Crontrol plugin? Are you sure the WP cron if firing?

    Thread Starter johpg

    (@johpg)

    Yep still not working.

    If I run job_manager_check_for_expired_jobs from the WP Crontrol plugin I get this:
    “Successfully executed the cron event job_manager_check_for_expired_jobs.”

    However the event is not doing anything.
    There is a job that should be set to expired and yet the status remains active.

    I am also having problems with listings (which are scheduled to expire) not expiring.

    I’m also having a problem with the Expiry Date being set back one day when publishing/updating a job. (ie: a job set to expire on 4/10/2017 will change to 4/9/2017 upon publish/update)

    HELP!

    Plugin Contributor jonryan

    (@jonryan)

    @johpg would you mind posting this issue to Github that way you can follow the status of it? https://github.com/Automattic/WP-Job-Manager/issues/new

    @aaron-bobaron we are aware of the second issue and are working on it

    Thread Starter johpg

    (@johpg)

    Have posted issue to GitHub:

    Job Expiry & Expired Job Deletion Not Working #983

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Job Expiry & Expired Job Deletion Not Working’ is closed to new replies.