Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


Support
2020-09-08T07:16:02Z
Originally Posted by: srilatha 

Hi,

I have a requirement where i need to build a job variable to get the next working day.
Ex: if today is Saturday the job variable should get the date of Next working Day(i.e Monday)
if today is sunday i need to get the working day as Monday
can you please let me know how can i do that



Hi,

What about just adding a workday to todays date? {DATEADD(Workdays|{DATEFORMAT(yyyy-MM-dd HH:mm)}|yyyy-MM-dd HH:mm|1|yyyy-MM-dd HH:mm)}
Michael
Support
http://www.visualcron.com 

Please like  VisualCron on facebook!
Sponsor
Forum information
srilatha
2020-09-08T07:26:55Z
Hi Michael,
Thanks for your reply!!
The below solution doesn't work. I need to get the Next work day. My requirement is that my job runs on Saturday and Sunday but the date should point to Monday. so, I should have the date variable which should point to Monday date.
Is there a way to get the Mondays date regardless whether it was ran on Sunday or Saturday?
Support
2020-09-08T12:42:53Z
Originally Posted by: srilatha 

Hi Michael,
Thanks for your reply!!
The below solution doesn't work. I need to get the Next work day. My requirement is that my job runs on Saturday and Sunday but the date should point to Monday. so, I should have the date variable which should point to Monday date.
Is there a way to get the Mondays date regardless whether it was ran on Sunday or Saturday?



Ok, so if the job is only run at saturday on sunday, then {DATEADD(Workdays|{DATEFORMAT(yyyy-MM-dd HH:mm)}|yyyy-MM-dd HH:mm|1|yyyy-MM-dd)} should always be Monday,

But if you always want Monday regardless of when the job is run, then there is no variable for that, you will have to use Time trigger for that
Michael
Support
http://www.visualcron.com 

Please like  VisualCron on facebook!
thomas
2020-09-09T07:03:58Z
Hi

The solution {DATEADD(Workdays|{DATEFORMAT(yyyy-MM-dd)}|yyyy-MM-dd|1|yyyy-MM-dd)} works as you specified. It will point to monday, if the job is run on friday, saturday or sunday. If the job is run on monday, it will point to tuesday, and so on.
Scroll to Top