I tried to deactivate the timer using ossys_Cyclic_Job_Shared table attribute next run but its showing error as ossys is reserved prefix . any other way is there pls share. without using service center i want to activate and deactivate in runtime in portal
Hi Aslam,
You do not need to use a SQL query, and use OSSYS. The System module has a Cyclic_Job_Shared entity you can use in an Aggregate, as well as entity actions to modify it:
As for activating/deactivating the timer, see my article on Timers. It describes the value to put in Next_Run (viz. #3000-01-01#) to deactivate the timer, and what to be aware of when doing so.
Thanks
Hi @Aslam.
You can simply create a site property isTimerActivate (boolean) and check in your timer's action on top of code if isTimerActivate = true then only code will execute else (false branch of If) End the code.
Wherever/whenever you want you can change the value of isTimerActivate site property.
This way you can mimic timer as deativated timer.
Thanks,
Sanjay Kushwah
Hello Aslam,
To toggle the timer during runtime, you can manage it with a site property:
1. Establish a basic site property named IsRunTimer of type Boolean, and default it to True.
2. Within the Timer's Logic, verify the IsRunTimer property. If it's true, proceed with the timer's execution; if not, terminate the logic early without any action.
3. Anytime you need to halt the timer within your Application, change the IsRunTimer site property to False. This will prevent the timer from running.
Hope this will help you, happy coding...
This doesn't prevent the Timer from running, it only prevents the Timer from doing anything when it runs. Which may be what you want, but it needs a code change, and it's different from actually deactivating the Timer.