You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think there is a problem between the concepts of "defined jobs" and "jobs stored in the database".
My situation is like this: I have cronjob to run once per day. The task of the cronjob is to fetch some entities from the DB and then create one cronjob per entity.
The cronjob will first fetch all jobs via job, then check if there is already a job for some entity. If there is already a job, there is nothing to do.
At least, I thought so.
However, it does not seem to be the case.
After a restart of the server, the cronjobs created by the main job never get executed - despite being found with the jobs method. I think the reason is that the jobs never get to run define() upon server restart. And I guess I have found a workaround by just running await job.save() on every job.
However, I think this should be addressed somehow, or at least documented.
The text was updated successfully, but these errors were encountered:
I think there is a problem between the concepts of "defined jobs" and "jobs stored in the database".
My situation is like this: I have cronjob to run once per day. The task of the cronjob is to fetch some entities from the DB and then create one cronjob per entity.
The cronjob will first fetch all jobs via
job
, then check if there is already a job for some entity. If there is already a job, there is nothing to do.At least, I thought so.
However, it does not seem to be the case.
After a restart of the server, the cronjobs created by the main job never get executed - despite being found with the
jobs
method. I think the reason is that the jobs never get to rundefine()
upon server restart. And I guess I have found a workaround by just runningawait job.save()
on every job.However, I think this should be addressed somehow, or at least documented.
The text was updated successfully, but these errors were encountered: