Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Far future jobs don't run – cronHistory only exists after event runs. #111

Closed
mattlinares opened this issue Sep 6, 2016 · 5 comments
Closed

Comments

@mattlinares
Copy link

I can make near future (e.g. 1 min) jobs run, but am having problems with jobs that run in a week or so. I want to debug by inspecting the queued tasks, which I thought cronHistory would enable (since it helps sync between processes), but cronHistory items don't appear until after the job has run.

How can I inspect queued processes that haven't run yet to get an idea of when jobs are actually being set up or not? Right now I can't debug why certain tasks are not running.

Thanks

@spawn-guy
Copy link

"Current" Jobs are stored in Memory.
if you create Jobs in Runtime look at this issue #80 and remember that cronHistory - is just History.

if your server restarts - you need to re-create runtime jobs

@ElegantSudo
Copy link

@spawn-guy I don't get it, are you saying that synced-cron's jobs don't persist in the database?

@JanSchuermannPH
Copy link

@ElegantSudo future jobs are not stored in the database but the memory. If you restart your server, the memory resets and the jobs are scheduled again.

If you had a job that should run "in 1 week", and you restart the server after 5 days, the job will run 1 week after you restarted the server.

the cron history persists in the database up to the TTL you set in the synced cron config.

@ElegantSudo
Copy link

@JanSchuermannPH so in other words, "every Wednesday at 7:00pm" would work fine, but "in 5 days" would not.

@TheGame2500
Copy link
Collaborator

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants