If I manually add a job to the cron_schedule, then sometimes it will run and sometimes it will get removed from the table before running?

What/where is that functionality that do that kind of cleanup on 'pending' jobs that have not reached the schedule time yet?

1 Answer 1


It's possible that they're being scheduled too far in advance and are getting cleaned up before they have a chance to run. You might need to adjust your cron_cleanup_every configuration value, or the timing of your cron jobs, to prevent this from happening.

You can check the configuration for your cron group here :

Store configurations > Advanced > System > Cron (Scheduled Tasks) > Cron configuration options for group:index

enter image description here

You can update it as per your requirement.

  • That could be the reason, but then again. I cannot figure what data the cleanup is targeting? When both the created_at and scheduled_at fields are in the future ?
    – AP87
    Commented 2 days ago

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.