109
Views
6
Comments
Solved
Activate/Deactivate timer on specific tenant

Im trying to build a timer that reads an excel file.

The file has a timer name, timer application, timer schedule, and isactive attribute.

Timer schedule and is active are to be editted in the file. Problem is that the IsActive attribute is stored in Meta_Cyclic_Job, which does not specify Tenant(Table is defines as Not Multi-Tenant). The table that keeps the tenant timer (Cyclic_Job), does not have an IsActive attribute. But in service center you can deactivate timers to only some tenants. 
So my question is: Is it not possible to do this with a timer?

2023-08-28 07-00-10
Paulo Torres
Champion
Solution

Hi Diogo,

You are seeing something wrong, when you create your tenant, platform create one row for each tenant automatically. And to activate and deactivate via Data Base there is no parameter to define this, you should work with "Next_Run" parameter. 3000-01-01 means there is no schedule.


2023-08-28 07-00-10
Paulo Torres
Champion

Table you are looking for is: Cyclic_Job (Where you have all configurations of Timer)

Any doubt let me know

2025-09-05 10-36-14
Diogo Madeira

Hello Paulo, thank you for your answer.

Yes, the problem is that Cyclic_Job does not store the isActive attribute.

Meta_Cyclic_job does, but there is only one record of Meta_Cyclic_Job, for a single timer, no matter how many tenants there are. Meaning that when I change the value of the IsActive attribute, it does so, to all tenants, and I do not want that, i want to either activate or deactivate a timer, on a single tenant.

2023-08-28 07-00-10
Paulo Torres
Champion
Solution

Hi Diogo,

You are seeing something wrong, when you create your tenant, platform create one row for each tenant automatically. And to activate and deactivate via Data Base there is no parameter to define this, you should work with "Next_Run" parameter. 3000-01-01 means there is no schedule.


2025-09-05 10-36-14
Diogo Madeira

Ahh, I see, I didn't realise that the Next Run attribute was the one that defined if a timer is activated or not, hence my question. Thank you for your help!

2023-08-28 07-00-10
Paulo Torres
Champion

Glad to help you understanding the Darkness of Outsystems :)

2017-03-03 12-48-17
Balasubramanian Prakasam

Hi,

I know this is old topic, but found something interesting, we can deactivate timer programatically, with updating following parameters, if timer have different schedules, and purpose is just to deactivate then here following,

Update 2 columns of the CyclicJobShared system entity, then timer is deactivated immediately.


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.