cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Turn off Scheduler timer

MO_10216552
4-Participant

Turn off Scheduler timer

Hello I'm trying to disable the Automatically Enable Timer on Startup checkbox via a service I tried with the DisableTimer() function but it doesn't seem to be a function for SchedulerThing, any idea how I could do this? 

MO_10216552_0-1658823552409.png

 

3 REPLIES 3
abjain
15-Moonstone
(To:MO_10216552)

@MO_10216552 You will have to use the 'SetConfigurationTable' service (you can use the snippet for this service in the other service code) on your scheduler thing and use the 'Settings' table for it. Please see below screenshot:

abjain_0-1658826125638.png

For the 'configurationTable' parameter in the above service, you will have to create a data shape first as below:

abjain_1-1658826287673.png

 

 

slangley
23-Emerald II
(To:MO_10216552)

Hi @MO_10216552.

 

Can you explain why you have the option enabled if you don't wish to use it?  Maybe we're not understanding your use case, so if you can provide more information, that would be helpful.

 

Regards.

 

--Sharon

This worked for me with the info from @abjain:

    let t = Things["YourScheduler"];
    t.DisableScheduler();
    let ct=t.GetConfigurationTable({tableName:"Settings"});
    ct.rows[0].enabled=false;
    t.SetConfigurationTable({tableName:"Settings", configurationTable:ct, persistent:true});

 

Announcements


Top Tags