How to trigger task before 1 Business day
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2024 05:31 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2024 09:22 PM
Well, the script seems fine, as far as I can see.
I cannot validate if the calculation on your schedule is correct,
because I don't know what your schedule looks like.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2024 02:08 AM
Hi OlaN,
Thanks! Everything working fine now, the issue was in cmn scheduled, The only thing observed was the script subtracting one hour as well for example below the start time of 2024-11-04 12:30:00 and the task generating time is 2024-11-01 11:30:00.
Is this the expected or something missing in the script.
*** Script: time check: 2024-11-04 12:30:00
*** Script: time check: 2024-11-03 12:30:00
*** Script: schedule check: com.glide.schedules.Schedule@51a89dc3
*** Script: time check1: 2024-11-02 11:30:00
*** Script: schedule check: com.glide.schedules.Schedule@51a89dc3
*** Script: time check1: 2024-11-01 11:30:00
*** Script: task created one day before business days: 63039
*** Script: selected day: 2024-11-01 11:30:00

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2024 03:50 AM
I would say that the difference is because of timezone and/or daylight savings differences.
Again, there is a difference whether you are using the displayvalue or the value, where the displayvalue takes account into difference between the users timezone and daylight savings, compared to the value stored in the database.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2024 04:49 AM - edited 11-01-2024 04:50 AM
The system time is in GMT and i am also adding the time in GMT on the variable.
We have tried both displayvalue or the value and same result and now using only getValue and setValue.
We will test on Monday because DST will start from 2nd November mid night.