Hi,
I want to schedule one chore job monthly. But TM1 doesn't support schedule monthly. How can I do it?
With best regards,
LP_user
How to schedule chore job monthly
-
- MVP
- Posts: 1815
- Joined: Mon Dec 05, 2011 11:51 am
- OLAP Product: Cognos TM1
- Version: PA2.0 and most of the old ones
- Excel Version: All of em
- Location: Manchester, United Kingdom
- Contact:
Re: How to schedule chore job monthly
Presumably you mean that you want a chore to run on the last day of every month (or something like that).
You can just schedule 1 TI Process (lets call it "z_control") to run every day at your desired time.
In the Prolo of that one process you have an IF statement to check whether the date "NOW" fits within the parameters you want and if it isn't then it just ends.
If the parameters are met then you just use ExecuteProcess()'s to kick off all the TIs you would have had in your chore.
HTH
You can just schedule 1 TI Process (lets call it "z_control") to run every day at your desired time.
In the Prolo of that one process you have an IF statement to check whether the date "NOW" fits within the parameters you want and if it isn't then it just ends.
If the parameters are met then you just use ExecuteProcess()'s to kick off all the TIs you would have had in your chore.
HTH
Declan Rodger
-
- Posts: 28
- Joined: Mon Feb 04, 2013 5:10 pm
- OLAP Product: Cognos TM1
- Version: 9.5.1
- Excel Version: 2007
Re: How to schedule chore job monthly
Hi declanr,
Thanks for your answer. It is good idea to write one TI process to control the chore job.
Could you please give me the code example how to justify if the "NOW" is the last day of the month?
With best regards,
LP_user
Thanks for your answer. It is good idea to write one TI process to control the chore job.
Could you please give me the code example how to justify if the "NOW" is the last day of the month?
With best regards,
LP_user
declanr wrote:Presumably you mean that you want a chore to run on the last day of every month (or something like that).
You can just schedule 1 TI Process (lets call it "z_control") to run every day at your desired time.
In the Prolo of that one process you have an IF statement to check whether the date "NOW" fits within the parameters you want and if it isn't then it just ends.
If the parameters are met then you just use ExecuteProcess()'s to kick off all the TIs you would have had in your chore.
HTH
- Alan Kirk
- Site Admin
- Posts: 6610
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: How to schedule chore job monthly
See my post on Using Dates And Times, which lists all of the relevant functions including the Day() one.LP_user wrote:Hi declanr,
Thanks for your answer. It is good idea to write one TI process to control the chore job.
Could you please give me the code example how to justify if the "NOW" is the last day of the month?
In this case I would add 1 to the Now() value to get the following day's date, then check the Day() function for that. If it's 1, you know that tomorrow is the first and that therefore today is the last day of the calendar month. This saves you from needing to do a test based on the month as well ("30 days has September, April June and November..." etc) and also gets you out of needing to worry about February in leap years.
If your accounting months do not correspond with the calendar months, though, you should have some form of dates lookup cube which contains flags to indicate dates which are the last day of the month. You would look up the date returned from the Now() function (converted to a string; again, see my post for details) in that cube to see whether it's currently the last day of the month.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-
- Posts: 22
- Joined: Mon Oct 01, 2018 1:50 pm
- OLAP Product: TM1
- Version: 10.2.20500.75
- Excel Version: 2016
- Location: Montreal, Canada
Re: How to schedule chore job monthly
Thanks Alan,
The following process is executed every day and it works just fine to execute my Month-End process.
Cheers,
Peter
The following process is executed every day and it works just fine to execute my Month-End process.
Code: Select all
#==================================================
# Variable Declaration
#==================================================
sTomorrow = DATE(NOW + 1);
#==================================================
# Execute process based on sTomorrow value
#==================================================
IF(DAY( sTomorrow ) = 1);
# Do stuff
ENDIF;
Peter
- macsir
- MVP
- Posts: 785
- Joined: Wed May 30, 2012 6:50 am
- OLAP Product: TM1
- Version: PAL 2.0.9
- Excel Version: Office 365
- Contact:
Re: How to schedule chore job monthly
In newer TM1 version, tm1runti command can execute chores now.
https://www-01.ibm.com/support/docview. ... wg27048305
https://www-01.ibm.com/support/docview. ... wg27048305
-
- Posts: 22
- Joined: Mon Oct 01, 2018 1:50 pm
- OLAP Product: TM1
- Version: 10.2.20500.75
- Excel Version: 2016
- Location: Montreal, Canada
Re: How to schedule chore job monthly
Thanks macsir but i'm not sure to understand how tm1runti can solve this problem ?
Peter
Peter
-
- MVP
- Posts: 3123
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.0.9.18
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: How to schedule chore job monthly
You could use a Windows Scheduled Task, containing the script with TM1runti.exe. For example a batch file.
If then the script is executed every first of the month using Windows, you obtain what is required.
If then the script is executed every first of the month using Windows, you obtain what is required.
Best regards,
Wim Gielis
IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
-
- Posts: 22
- Joined: Mon Oct 01, 2018 1:50 pm
- OLAP Product: TM1
- Version: 10.2.20500.75
- Excel Version: 2016
- Location: Montreal, Canada
Re: How to schedule chore job monthly
Thanks Wim !!