Reinitiate Missed Tasks for Dataset Rebuild and Delivery Publishing Tasks
Scenario:
When Smarten Server is down due to some unforeseen technical issues, the scheduled dataset rebuild and Publishing Delivery tasks scheduled in that times are missed.
Requirement:
Setup a way to reinitiate missed tasks as soon as the server is available again.
What does Misfire mean?
A misfire means that the task was supposed to execute but did not get executed for some reason.
If there is some technical issue due to which the Smarten server is unreachable or not responding, or the server is shutdown, all the tasks that were supposed to run during the time when the server was down, will be considered missed.
This article shows how to activate misfire flag in Smarten configuration so that in an event of server being down, all the tasks will run automatically as soon as the server is back up.
How to activate Misfire Flag?
The following are the steps to set up misfire flag in Smarten config:
1. Open default.conf located in the following location smarten/wildfly/standalone/deployments/smarten.war/conf
2. Change the parameter value to True for QRTZ_MISFIRE_INSTRUCTION_FIRE_ONCE_NOW and save the changes. Please refer Figure 1.
Figure 1: Turn Misfire Instruction to True
3. Next, edit quartz.properties located in smarten/wildfly/standalone/deployments/smarten.war/conf
4. Set org.quartz.jobStore.misfireThreshold = 1800000 and save the changes. Please refer Figure 2.
Figure 2: Increase the misfire threshold
5. Edit all your tasks through utility to inactivate and activate them. This step will make sure that all your tasks update the recent changes you have made for misfire execution.
Now, you are all set for misfire execution of your missed tasks. Next time if your server is down, all the tasks will run automatically in the sequence of the set time, when the server is running again.
Please Note:
- A misfire of any task can happen due multiple reasons including, power failure, Smarten service stoppage, Server getting hanged or Server crashing.
- When the misfire flag is configured, the system will give priority to the tasks based on scheduled time. For instance, if there are three tasks that were missed and these tasks were scheduled at 9.00 PM, 9.15 PM and 9.30 PM.
So as soon as the system is available again, the task scheduled at 9.00 PM will be executed first followed by the tasks scheduled at 9.15 PM and 9.30 PM respectively in the sequential order of their schedule. - Also, in case of the same task being missed multiple times, the task we be re-executed for all the missed attempts one after the other.
- The flag config works the same way for a delivery and publishing task as it works for a dataset rebuild task. There is no separate property to be set for either.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article