Create a catalog task at next day morning at 6 am through workflow when 'Expiration date' is today
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2024 04:18 AM
Hi ServiceNow Folks,
I need a help on to create a catalog task at next day morning at 6 AM through workflow when 'Expiration date' (date type only) variable is today. I have used timer activity but it's not working as expected.
I have written following script in timer activity.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2024 06:00 AM
Hi @Mani Polisetty2 ,
You have to consider some execution path here,
1) Once the workflow trigger the first time , apply the If condition to check if today's date is expiration date , if yes, then apply the timer to wait till 6 AM next day.
2) if step 1 return false then add the timer to wait till expiration date and loop to If condition, on expiration date the timer will again call to if condition and this time it will true.
3) after if condition return true , the next timer to wait till current date/time+1 ( next day ) 6:00AM for catalog task.
If you already developed some execution path, please share the screen shot.
-Thanks,
AshishKM
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2024 12:47 AM
Hi Ashish,
Great thanks for your response, I have created following workflow for this requirement. The process is
1) Reporting manager approval
2) Group Approval
3) Create catalog task after completed the approvals
4) I have added the Timer for 'Send email notification 7 days before on Expiration Date Variable' sending an email notification 7 days before on Expiration Date Variable value. Using following script and it's working as expected in background scripts.