without database involved, how is job status maintained? #770
-
jobs are allowed to be defined as month jobs, considering such a long period, how is the status of jobs managed? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
It's up to your app to decide how to handle maintaining status / state. The design of gocron is pretty resilient such that, if your application were to restart, the job would just be scheduled again for the same next time. For example, you're next run is scheduled for Oct 1, and your application restarts on Sep 29. Gocron would recalculate the jobs next run on start up and would still be Oct 1. The main risk you have to determine how you want to handle is the case where your application goes down on Sep 30 and doesn't come back up until Oct 2. For that case, it would be scheduled for Nov 1 and the Oct 1 run would be missed.
There are no retries built in. You can determine how you want to handle a "failure" by returning an error from your job and using the AfterJobRunsWithError listener |
Beta Was this translation helpful? Give feedback.
-
Hi there, i am Xavier, if u r seeing this, it means that i have received your letter and i will try to reply sooner. Ur respectfully.
|
Beta Was this translation helpful? Give feedback.
in memory
Couple options: