scheduled job periodically
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2023 04:05 AM
Hi
In my incident table, I created a field called maintenance, so in that field, once and periodically, like a scheduled job, when I am trying to execute it periodically, nothing happens.
This is the code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2023 06:57 AM
Hello @manumanoj ,
As a first noticable difference is the Name of schedule Manitance field. In your script you are using two different name is this are the same field name or different ?
If you are trying to use the same Field then corrent the code with exact backend name of code. ?
If this is not the case then can you please explain the requirement?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2023 08:43 AM
Hi Siddhesh
Names are the same. My requirement is in my incident table. I have created a field called schedules maintenance and added two values: 'once' and 'periodically' if I select periodically and need to set repeated intervals and started time. This is in my incident table.
Create a new scheduled job. There, I will set the interval to every 5 minutes, so it will check in the incident table that if scheduled maintenance is periodically and repeated interval is not empty and the start date is not empty. if condition true create incident every 5 minutes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2023 07:06 AM
This line has an error with the field name:
var startDateTime = new GlideDateTime(gr._starting_date);
missing the initial "u".