Loading...
Loading...
When sysauto records of Run type 'Business Calendar: Entry X' hit their due time, they can execute multiple times in quick succession for the same sys_trigger record. This has potential to result in jobs being scheduled for the same calendar span time (same year, quarter, etc.) but with an hour difference - possibly due to changes in system time, or timezone, or daylight savings switches since the last execution, essentially making the job execute again 1 hour later.
1. Create a new sysauto record 2. Set the following values: a. Run value to 'Business Calendar: Entry Start' b. Business Calendar to any option c. Offset type to Future d. Offset to some time just in the future e. The job should only run something that will complete very quickly - i.e. within 1 second of starting # Note: Can have the associated sys_trigger record in the list view so that the next_action is visible and adjust the Offset of the sysauto record until it is only a minute away for testing purposes 3. Once the sys_trigger runs, check the logs (may need to test several times, as this appears to be dependent on how soon into a second the job runs) Expected behaviour: The job has run just once Actual behaviour: Sometimes the job will be triggered multiple times within the same second and result in the next_action not being updated to the next quarter/year
The following can be done on the sysauto record to prevent this behaviour: 1. Mark the 'Conditional' checkbox so that it is active 2. Add the below code to the 'Condition' script box: Line 1: a sleep of 2 seconds to ensure that the job does not complete within 1 second of having started Line 2: a condition that evaluates to true to ensure that the job runs (unless an actual condition already exists that needs to be evaluated, in which case that evaluation can be the final line) E.g.: ---- gs.sleep(2000); 1 === 1; ----
PRB1643089
Click on a version to see all relevant bugs
ServiceNow Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.