Scheduling in Post Expirator: Cron Jobs
The scheduling in Post Expirator is handled by cron jobs.
This plugin does require that WP-CRON is setup and functional on your webhost. Some hosts do not support this, so please check and confirm if you run into issues using the plugin.
You can see all the active cron jobs on your site by going to Settings > Post Expirator > Diagnostics. This table will show all currently scheduled cron events with the next run time. Post Expirator creates an event called
postExpiratorExpire. You can see this in the image below:
If you want to see expiry details in the database, WordPress stores cron jobs in the
_options table. The option_name is
This code below shows a typical cron job entry from Post Expirator.
Some of the specific details are also held in the
_postmeta table. In the image below, the “expireType” is set to “Delete” so this post will be entirely removed from the site when it expires.
- Post ID: 10
- Expiry Date: September 3, 2021 8:56 pm. This is set using Unix time which is an integer number that counts date and time in seconds since 1970-01-01. There are convertors available for Unix time including Epoch Converter.
_wp_old_date in the image above is a useful WordPress core feature that is explained in this article.