cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to programatically enable/disable a schedule?

Former Member
0 Kudos

Hi,

I'm looking for a way to start and stop an existing schedule based on certain criteria.

Is it possible to enable/disable a schedule programatically, from within an Action block? Calling an HTTP URL for example?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Francois,

It is quite possible to enable or disable scheduled transaction from the BLS transaction.I don't know why do you want this facility.

I've tested in MII 11.5 as explaine below:

Scheduler xml files are available in the root folder C:\Lighthammer\Scheduler\. You have to just load these in trnsaction from XML Loader action block..In this xml file you can find the enable attribute,through this you can enable od disbale by setting "true" or "false" respectively. Then save these xml files using XML Saver action block. Then refresh the MII menu and check the scheduler tab the output will be reflected.

-Suresh

Edited by: Suresh Hiremath on Sep 11, 2009 11:56 AM

Former Member
0 Kudos

Thank you Suresh,

I'm running MII 12.0.5 and I can't find any XML file with Schedule data. Maybe I missed it. There is a Scheduler folder but it only contains jsp pages. I suspect Schedules have been moved to the NW DB, which I do not have access to.

FYI, the reason I'd like to disable this is to control the execution of rather high frequency activites only to certain period of time, based on conditions on external systems. This only to minimize resource usage.

So my question is still open. Can this be done with MII 12.0, without accessing the NetWeaver DB?

Thanks.

jcgood25
Active Contributor
0 Kudos

Suresh - Manually editing or manipulating these XML files is not a recommended or encouraged process.

Francois - why not just run a quick query at the beginning of the scheduled TRX to determine if the logic needs to be processed?

Former Member
0 Kudos

Jeremy,

I will follow your advice.

Thank you both.

Former Member
0 Kudos

Jeremy,

Scheduler xml files will be generated when we create a schedule a transaction, so I thought by changing this it cannot effect the application. Thanks for informing me.

-Suresh

former_member4529
Active Contributor
0 Kudos

Hi,

One solution would be using the Illuminator service for this:

First execute the Scheduler service with list mode (using XML query or HTTP Post action) as :

/XMII/Illuminator?service=Scheduler&mode=List

This will give you the list of the available scheduler configurations in the system along with the corresponding Job ID. Use XPath in BLS to retrieve the JobID from the list by the Scheduler Config name.

Next execute the Scheduler service with Disable mode passing the JobID retrieved from :

/XMII/Illuminator?service=Scheduler&mode=Enable&ID=<JobID>

This will disable that particular scheduled job. To enable it use the same service with Enable mode:

/XMII/Illuminator?service=Scheduler&mode=Disable&ID=<JobID>

Hope this helps.

Thanks,

Dipankar

Former Member
0 Kudos

Thank you Dipankar,

this is exactly the information I was looking for.

Is there a document listing the parameters for other/all ofNetweaver/MII configuration parameters and the grammar to get/set them via HTTP requests like you shown?

former_member4529
Active Contributor
0 Kudos

Hi,

In our [book|http://www.sap-press.com/product.cfm?account=&product=H3038] we have documented some of them - the most useful ones.

Thanks,

Dipankar

Answers (0)