Community discussions

MUM Europe 2020
 
csalcedo
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 61
Joined: Fri Jan 22, 2016 8:09 pm
Location: Santiago Chile

Run a script every 3rd of the month

Mon Apr 25, 2016 9:33 pm

Hi Guys,

I need a script that will run every 3rd of the month.

I now i can schedule to run every 4 weeks etc but how to run every X of the month??

Maybe run once a day and check the date then parse the day then do what I need to do????
If so how to parse the date..


Thanks
 
User avatar
che
Frequent Visitor
Frequent Visitor
Posts: 94
Joined: Fri Oct 07, 2005 1:04 pm

Re: Run a script every 3rd of the month

Mon Apr 25, 2016 10:44 pm

I would do the same as you suggested: schedule a script to run every day and check the date, and if day of the month is equal to 3 then proceed with whatever you wanted to do.

So, you need to declare variable for a day of the month in order to proceed. For example:
:local date [/system clock get date]
:local day [:pick $date 4 6]

:if ($day = "03") do={
BODY OF YOUR SCRIPT
}
 
csalcedo
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 61
Joined: Fri Jan 22, 2016 8:09 pm
Location: Santiago Chile

Re: Run a script every 3rd of the month

Mon Apr 25, 2016 11:17 pm

Perfect.. works great

thanks

Who is online

Users browsing this forum: No registered users and 11 guests