Title: Posts expiring on wrong date
Last modified: August 21, 2016

---

# Posts expiring on wrong date

 *  [Shaun Robinson](https://wordpress.org/support/users/rubious/)
 * (@rubious)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/posts-expiring-on-wrong-date/)
 * Hi there,
 * We have used your plugin happily on a client’s website for a long time, but recently
   there was a problem.
 * Dozens of posts were set to expire last month, but we went in and edited them
   to change the expiration date to a future date. When the date they were originally
   set to expire came along, around 3 quarters of the posts we changed did actually
   expire, even though when editing the post it still shows the future expiration
   date.
 * So even though the post expiration date has been saved, it still expired on the
   original date.
 * Do you have any idea what could be causing this? Here is a link to the logs: 
   [http://pastebin.com/2LXKTiFs](http://pastebin.com/2LXKTiFs)
 * Thanks
    Shaun
 * [http://wordpress.org/plugins/post-expirator/](http://wordpress.org/plugins/post-expirator/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [arielmeadow](https://wordpress.org/support/users/arielmeadow/)
 * (@arielmeadow)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/posts-expiring-on-wrong-date/#post-3997574)
 * I am experiencing this same issue with expiration dates that have been changed.
   I’ll have my developer come and link logs if possible.
 *  [kellbot](https://wordpress.org/support/users/kellbot/)
 * (@kellbot)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/posts-expiring-on-wrong-date/#post-3997641)
 * Some more background on this problem: looking at the Cron schedule there are 
   two expiration events: one set for a year after the publication date, and also
   the correct one. We don’t have any default date set in the Post Expirator settings.
 * The edit post page shows the correct date.
    If I update or change the expiration
   date, the date which was correct before will change, but the first incorrect 
   date still persists. It’s like it isn’t clearing all of them out or something.
 *  [kellbot](https://wordpress.org/support/users/kellbot/)
 * (@kellbot)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/posts-expiring-on-wrong-date/#post-3997642)
 * I figured out why this is happening:
 * We’ve been using Post Expirator for a long time. We used to expire our posts 
   a year from creation, but then switched to expiring all of them at the end of
   the month.
 * It looks like at some point, the arguments stored in wp cron changed from being
   stored as a string to an integer. So the post ID argument went from being “1776”
   to just 1776. WordPress apparently considers these two different values, and 
   as a result wasn’t deleting the old cron item when we updated our expiration 
   dates.
 * It would be great if the plugin could be updated to double check for the older
   style entries when updating, just so those get cleared too. Meanwhile I’m hand
   cleaning the cron tasks of errant items.
 *  [Aaron Axelsen](https://wordpress.org/support/users/axelseaa/)
 * (@axelseaa)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/posts-expiring-on-wrong-date/#post-3997643)
 * I’ll see if I can get this fixed – thanks for pointing it out!
 *  Thread Starter [Shaun Robinson](https://wordpress.org/support/users/rubious/)
 * (@rubious)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/posts-expiring-on-wrong-date/#post-3997644)
 * It would be great if you could update the plugin to fix all the errant cron jobs,
   I am also having a problem where posts are not expiring when they should; we 
   had lots of expire at the end of last month and they did not.
 * Is it something to do with the mixture of strings and integers stored in the 
   cron jobs? Here’s a quick screenshot from WP Crontrol: [https://files.app.net/pcs1D-1o.png](https://files.app.net/pcs1D-1o.png)

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Posts expiring on wrong date’ is closed to new replies.

 * ![](https://ps.w.org/post-expirator/assets/icon-256x256.png?rev=3118683)
 * [Schedule Post Changes With PublishPress Future: Unpublish, Delete, Change Status, Trash, Change Categories](https://wordpress.org/plugins/post-expirator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-expirator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-expirator/)
 * [Active Topics](https://wordpress.org/support/plugin/post-expirator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-expirator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-expirator/reviews/)

 * 5 replies
 * 4 participants
 * Last reply from: [Shaun Robinson](https://wordpress.org/support/users/rubious/)
 * Last activity: [12 years, 8 months ago](https://wordpress.org/support/topic/posts-expiring-on-wrong-date/#post-3997644)
 * Status: not resolved