How to get the start time and end time of a scheduled job
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2016 12:19 AM
Hi All,
As per our requirement, we need to run three scheduled jobs in an order. for now, we have estimated the time and kept timers in workflow for that particular time. Is there any way to know the time in which a scheduled job started and ended, so that i can kept that condition and then that process will be fine. Please provide your suggestions.
Thanks & Regards,
Swamy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2016 05:41 PM
I put gs.log at the top and bottom of the scheduled job:
gs.log('Starting scheduled job', '$$$$ - SCHED JOB');
//Scheduled Job here
gs.log('Ending scheduled job', '$$$$ - SCHED JOB');
Then you can search all logs for the source $$$$ - SCHED JOB and find the time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2016 06:15 PM
I agree with Paul has said.
Create a schedule job.
At the end of the schedule job, fire an event.
Use script action which runs based on the event and then call the next schedule job using this script action and repeat the process so on...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-05-2016 12:54 AM
Hi Paul,Mike,Deepak,
Thank you so much for your valuable replies.
Hi Deepak,
what is the activity used to invoke script action and inb script action how can i query to know whether the event in the first scheduled job was triggered or not.
Regards,
Swamy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-05-2016 02:01 AM
Creating a Scheduled Job - ServiceNow Wiki
You can configure something like shown in the diagram. I would suggest to check below wiki links as well.
Workflow Events - ServiceNow Wiki