Running chores on a specific day of the month
Scheduling chores in TM1 can be frustrating as it does not offer to run on specific dates or other types of events. The following article explains how to create chores schedules as flexible as you need them to be.
From the Server Explorer
- Create a new process
- Click Advanced ->Prolog tab
- Add this code:
#run chore every 1st day of the month If(SUBST(TODAY,7,2)@<>'01'); ChoreQuit; Endif;
- Save the process as "Scheduler"
- Create a new chore
- Select "Scheduler" and the other process(es) that you need to run
- It is important to put the "Scheduler" process first in the list
- Set it to run once a day
You are now set: that chore will run every first day of the month.
The ChoreQuit command will abort the "Scheduler" process and the subsequent processes in the chore list if today's date is not "01" i.e. the first day of the month.
From the above code you see that you can actually get your chore to run based on any sort of event, all you need is to change the conditional statement to the desired event.
Running chores on specific days of the week
DayOfWeek= Mod ( DayNo( TODAY ) + 21915, 7);
# 0 = Sunday, 1 = Monday to 6 = Saturday.
If( DayOfWeek = 0 % DayOfWeek > 4 );
ChoreQuit;
Add new comment