Kill a Night Chore manually

Post Reply
mnasra
Posts: 136
Joined: Tue Aug 10, 2010 5:40 pm
OLAP Product: Planning Analytics
Version: 2.0
Excel Version: EXCEL 2013

Kill a Night Chore manually

Post by mnasra »

Hi,

My client wants to know how to kill a TM1 Chore manually if he needs it- We are talking about a chore that runs at night.
I know about TM1TOP but I am looking for something else.
I also know about the TIME function in the prolog-

He just needs to know how to kill a job.

It sounds easy, but I dont know how to do it. I looked in the Forum and only found about the Time and Tm1top.
Thanks for your help.
Thanks
Micheline
User avatar
qml
MVP
Posts: 1098
Joined: Mon Feb 01, 2010 1:01 pm
OLAP Product: TM1 / Planning Analytics
Version: 2.0.9 and all previous
Excel Version: 2007 - 2016
Location: London, UK, Europe

Re: Kill a Night Chore manually

Post by qml »

It's a weird requirement, but I don't feel like explaining how to reject users' stupid requirements right now (but I hope you realise not everything you're being asked to do should be treated seriously). Instead, I'll share my idea on how to implement this one.

How about using a config cube value for this. You could create a cube which your user could change to sth else, say a 0 to a 1. In your processes, on each Metadata and/or Data tabs (or even all tabs, why not) you could put a simple value check - if the value has changed to 1, execute a ChoreQuit.

There is one issue with this approach. Namely, by reading the value from the cube the chore puts a lock on the cube that prevents any writing to it during the chore's execution. Fellow forum members, correct me if I'm wrong, but this value change would only be possible with TM1 9.5.2. If you have any other version then you can use the same approach, but instead of a cube value you can periodically check a directory for a specific file (for example by using WildcardFileSearch). Your user would have to place this file there (for example by executing a simple VBA script from an Excel button) to invoke the ChoreQuit function (and delete/move the file elsewhere).
Kamil Arendt
User avatar
jim wood
Site Admin
Posts: 3961
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

Re: Kill a Night Chore manually

Post by jim wood »

You are indeed right. It would have to be 9.5.2 and parralell interaction would have to be enabled. I'm still not 100% convinced it would still work as you expect. I woud test this heavily to one side before even mentioning it to a customer.
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
User avatar
paulsimon
MVP
Posts: 808
Joined: Sat Sep 03, 2011 11:10 pm
OLAP Product: TM1
Version: PA 2.0.5
Excel Version: 2016
Contact:

Re: Kill a Night Chore manually

Post by paulsimon »

Hi

I would try a method that is similar to the previous suggestion of the flag in a control cube, but as pointed out that suffers from the issue that the control cube may be locked while the chore is running, therefore as an alternative you can use

IF( FileExists('jumpout.txt') = 1 ) ;
ChoreQuit ;
ENDIF ;

This will look for the file in the cubes directory. If you would prefer that your user does not have access to the cubes directory, (although presumably if they have access to TM1 Top to cancel things then they have Admin rights anyway), then you can make it look for the file in another location. However, bare in mind that this must be relative to the server, and should probably be on a server local drive to avoid too much of an overhead if you are going to use this on the MetaData or Data tab.

I use something similar for when I am developing a WHILE loop that might get stuck and never exit, so I have a way to get out that doesn't involve killing the tm1sd.exe.

Regards

Paul Simon
mnasra
Posts: 136
Joined: Tue Aug 10, 2010 5:40 pm
OLAP Product: Planning Analytics
Version: 2.0
Excel Version: EXCEL 2013

Re: Kill a Night Chore manually

Post by mnasra »

Thank you All very much- It is amazing to have the answers that fast.

In fact, I think I got my answer from qml when he said:
It's a weird requirement, but I don't feel like explaining how to reject users' stupid requirements right now (but I hope you realise not everything you're being asked to do should be treated seriously).

My 'client' is NOT a TM1 user. So I cannot send him to a cube to stop the job.
THis is also why, I do not want to give him access (or the HOW of TM1TOP).

I think I will propose to kill my own job at a certain time of the night.

PS: YOU DID help me, because all these ideas will work for another customer of mine.
THANKS AGAIN
Thanks
Micheline
Post Reply