• Resolved Celeste

    (@celeste-9)


    I inherited a WooCommerce site and have noticed a recurring cron error in the PHP error log that has been going on for years. This error shows up every few seconds so the error log is huge. This is the error message:

    Cron unschedule event error for hook: woocommerce_send_queued_transactional_email, Error code: could_not_set, Error message: The cron event list could not be saved., Data: {“schedule”:false,”args”:{“filter”:”woocommerce_order_status_pending_to_processing”,”args”:[717,{“refunds”:[]}]}}

    I installed WP Crontrol and it tells me this is a non-repeating event that has been trying to run since July 14, 2017. I am unable to run, pause, or delete it. Deleting gives this error message: “The cron event list could not be saved.”

    I switched to the default theme and deactivated plugins, and the error still persists. Any ideas how to get rid of this error?

Viewing 12 replies - 1 through 12 (of 12 total)
  • HYe,

    Try this plugins : https://ww.wp.xz.cn/plugins/fand-transient-action-cleaner/ it’s clean Cron task and transient

    Indeed do Database backup before.

    Bests regards

    Plugin Support LovingBro (woo-hc)

    (@lovingbro)

    Hi @celeste-9,

    I can see how concerning this must be, especially with the error firing every few seconds and filling up the PHP log. That kind of persistent cron issue can be tricky, particularly when it has been stuck since 2017 and cannot be deleted through WP Crontrol.

    The error message could_not_set with “The cron event list could not be saved” usually points to a problem writing to the cron option in the database. This can sometimes be related to database corruption, object caching issues, or a locked option row.

    As @khahina suggested, using a cleanup plugin like F And Transient Cleaner can help clear stuck cron tasks and transients. You can find it here: https://ww.wp.xz.cn/plugins/fand-transient-action-cleaner/. Before doing this, please make sure to take a full database backup. That step is very important.

    In addition to that, I would also recommend:

    1. Checking with your hosting provider to ensure there are no database write restrictions or table corruption issues.
    2. Reviewing the wp_options table to confirm the cron option is not oversized or locked.
    3. Temporarily disabling object caching, if enabled, to see if that allows the cron array to be updated properly.

    You may also find it helpful to review how WooCommerce uses scheduled actions here: https://woocommerce.com/document/understanding-the-woocommerce-system-status-report/scheduled-actions/.

    Please let us know how it goes after trying the cleanup plugin and confirming the database health. We will be happy to continue digging into this with you.

    Thread Starter Celeste

    (@celeste-9)

    Thanks for the quick replies @khahina and @lovingbro. I think I’ve completed all of your recommendations and have not resolved the issue. This is what I’ve done:

    • Installed the Fand Transient and Action Cleaner plugin. It looks like it only goes back 90 days and did not appear to clean/remove any transients or actions. Are there any other plugins that clean the action scheduler for all time?
    • Disabled object cache.
    • Checked the cron option in the wp-option table. Everything looks normal.
    • Ran a “check tables” action on all of my database tables and everything looks good with no corruption.
    • Checked that my database is writable. It looks good, though my hosting account is not very clear about this. I’ve not had any other issues writing to the database, and all other cron events are functioning normally.
    • I turned on the debug log. It found one error, which I’ve copied below. Could this be related?

    Debug error: [16-Feb-2026 20:55:05 UTC] PHP Notice: Function WP_Scripts::add was called incorrectly. The script with the handle “wp-auth-check” was enqueued with dependencies that are not registered: heartbeat. Please see Debugging in WordPress for more information. (This message was added in version 6.9.1.) in …/public_html/wp-includes/functions.php on line 6131

    Any other advice you have would be helpful. Thanks!

    • This reply was modified 2 months, 2 weeks ago by Celeste.
    Plugin Support LovingBro (woo-hc)

    (@lovingbro)

    Hi @celeste-9,

    I can see how thorough you have been with this, especially after testing the cleanup plugin, disabling object cache, checking the database tables, and even turning on debug logging. When a cron event has been stuck since 2017 and still refuses to delete, that definitely points to something deeper at the database level rather than a normal scheduling issue.

    Thank you as well for sharing the debug notice. The WP_Scripts::add notice about wp-auth-check and heartbeat is unrelated to this cron problem. It is a script dependency notice introduced in recent WordPress versions and would not cause a cron event to fail to save or delete.

    Since:

    • The cron option looks normal
    • The database tables report no corruption
    • Other cron events are working fine
    • The error is specifically “The cron event list could not be saved”

    This strongly suggests the issue is tied to the cron option row itself in the wp_options table, possibly being oversized, partially serialized incorrectly years ago, or failing during update.

    At this stage, I would recommend the following more targeted approach:

    1. Take a full database backup.
    2. In phpMyAdmin or similar, locate the cron option in the wp_options table.
    3. Temporarily rename it from cron to something like cron_old.

    When you do this, WordPress will automatically regenerate a fresh cron array on the next page load.

    After that, check:

    • Whether the PHP log stops filling up
    • Whether the stuck woocommerce_send_queued_transactional_email event disappears

    If the issue is gone, that confirms the stored cron array was corrupted in a way that normal tools could not rewrite.

    Because the hook involves woocommerce_send_queued_transactional_email, it is also worth checking WooCommerce → Status → Scheduled Actions to confirm there are no failing or extremely old pending email actions still stuck there. More details on how WooCommerce handles scheduled actions can be found here: https://woocommerce.com/document/understanding-the-woocommerce-system-status-report/scheduled-actions/

    If you are not comfortable modifying the wp_options table directly, your host can safely assist with this since you have already confirmed the database is healthy otherwise.

    Please let us know what happens after regenerating the cron option. We will continue digging with you until this is fully cleared.

    Hi @celeste-9 ,

    Thank you for your detailed feedback. Your analysis was spot on: the previous version of the plugin was indeed too restrictive with the 90-day limit and was missing "orphan" tasks like yours dating back to 2017.

    I have just released version 1.0.2 of Fand Transient and Action Cleaner specifically to address this type of legacy blockage. Here is what I’ve improved for your specific case:

    Legacy Detection: The plugin no longer relies on the "last attempt" date (which is often empty for old bugs) but now uses the initial scheduled date. This finally allows it to track down and list your 2017 tasks.

    Invalid Date Cleanup: The plugin now forces the removal of rows with corrupted dates (like 0000-00-00) that often prevent WordPress from updating the cron array.

    Native Transient Purge: I have expanded the cleanup to include all expired transients, which should help unblock write operations in your wp_options table.

    What I recommend doing:

    Update the plugin to version 1.0.2.

    Go to the plugin settings page. You should now see your 2017 tasks appearing in the lists.

    Click the "Run Cleanup Now" button.

    This should force a purge of the actions related to woocommerce_send_queued_transactional_email and clear out the orphan logs bloating your database. If the could_not_set error persists after this, @lovingbro's suggestion about renaming the cron option would be the next step, but my plugin will have already handled the surgical deep cleaning.

    Let me know how it goes!
    Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi @fandevelop!

    Thank you for sharing your detailed feedback and explanation. We really appreciate you taking the time to provide more information about the issue this will be very helpful for others who might encounter a similar problem.

    Thread Starter Celeste

    (@celeste-9)

    Hi @fandevelop. Thank you for helping out with my issue and updating your plugin! I followed your instructions but the plugin doesn’t seem to be recognizing my troublesome cron event. Here are two screenshots of what I see before and after running the plugin:

    Before: https://www.dropbox.com/scl/fi/w57qrl7ibmdv397thm4n9/FAND-before.png?rlkey=elz8kknq4gv8zmt3v0rtp7i6w&st=ub711pcq&dl=0
    After: https://www.dropbox.com/scl/fi/jv561nh9hlsox3vj6sz9y/FAND-after.png?rlkey=td8o703q6zqiedo64c3nm51nl&st=f1il8h3z&dl=0

    Here is a screenshot from WP Crontrol:
    https://www.dropbox.com/scl/fi/vum1mhcaqljx2r5xvol6d/error.png?rlkey=nusst53iaj9mpf95blnawr6uh&st=ujjyjxfy&dl=0

    I haven’t yet tried the recommendations from @lovingbro. I’ll wait until you have a look at my screenshots to see if you have any more recommendations. This is probably an interesting test case for your plugin.

    Regarding this question from @lovingbro:

    “Because the hook involves woocommerce_send_queued_transactional_email, it is also worth checking WooCommerce → Status → Scheduled Actions to confirm there are no failing or extremely old pending email actions still stuck there.”

    I have checked that and there are no old or failing actions there. Everything looks to be operating normally.

    Thank you!

    Hi again @celeste-9,


    I just switched to version 1.0.3 with a new deep detection tool. Based on your screenshots, it seems your 2017 task is a native WordPress cron job (Native WP Cron) stored in the wp_options table.
    This type of old task can sometimes prevent the scheduling system from updating (causing the could_not_set error you observed), because standard tools are hesitant to modify it if the data is incorrectly formatted.

    What version 1.0.3 offers:

    It attempts to identify these “ghost” tasks (you’ll see them labeled “Native” in the table).
    If detected, the cleanup button will force its deletion and attempt to rebuild a clean table to unblock your site.

    This is a very promising lead for resolving your problem, I hope. Please let me know how it goes!

    Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi @celeste-9

    Please try what @fandevelop suggested first. If that doesn’t work, I’d recommend following the steps @lovingbro suggested and let us know whether that works for you.

    Thread Starter Celeste

    (@celeste-9)

    @fandevelop Your latest solution worked! After updating to version 1.0.3, the scheduled action showed up in the failed list, and after running the cleanup it is gone. It no longer shows up in the WP Crontrol cron events list, and I’m not getting anymore errors in my error log. I truly appreciate your help with this, along with @lovingbro, @shahzeenfarooq, and @khahina!

    Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there!

    Great to hear everything’s working perfectly now! Your feedback helps us improve and reach more users. If you have a moment, we’d be incredibly grateful if you could share your experience by leaving a review here:https://ww.wp.xz.cn/support/plugin/woocommerce/reviews/#new-post

    Thank you

    Hello @celeste-9,I’m delighted to hear that version 1.0.3 resolved the issue! It’s excellent news that the task has disappeared from WP Crontrol and, most importantly, that your error logs are finally clean.The “Ghost Cron” was indeed stubborn, but it’s precisely for these kinds of complex cases that I developed this deep cleanup tool.Thank you so much for your patience and detailed feedback, which helped me refine the fix. If you found the plugin helpful, please leave a review; it greatly benefits the project!Best of luck with your site.

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

You must be logged in to reply to this topic.