Time Period
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2023 11:37 AM - edited 09-02-2023 06:18 AM
Hello Team, is it possible to add a quarterly period ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2023 09:01 AM
I'm sorry but I do not have time to writeup the details of what you need to do. You have everything you need though.
Personally I would just update the form and put the script in you have since it should work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2023 08:54 AM
We can use 60 days but not every mouth have the same days. maybe 28days maybe 31days

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2023 12:54 PM
I use below in condition section
var gdt = new GlideDateTime();
var mon = gdt.getMonth();
(mon == 1 || mon == 4 || mon == 7 || mon == 10);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2023 01:00 PM - edited 08-31-2023 08:53 AM
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2023 09:34 AM - edited 08-31-2023 11:01 AM
To be clear, you want to set the "Run" field to "Monthly" and "Day" to "1" so the Workflow Schedule is triggered every 1st of the month, but then having the "Conditional" field checked, the schedule will not actually run the selected "Workflow" unless the "Condition" field evaluates "true". As mentioned by @DrewW , you will need to add the fields to the form.
And as @Mike Patel wrote earlier, your script could look something like:
answer = (function() {
//get the current month, in local time
var gdt = new GlideDateTime();
var month = gdt.getMonthLocalTime();
//is today the start of a new quarter?
return (month == 1 || month == 4 || month == 7 || month == 10);
})();
You would change the 1, 4, 7 and 10 if you are dealing with different quarters (such as financial quarters instead of calendar quarters).