Available only for systems with an active PRO license for any number of users
Daemons are processes running in the GO-model of Totum, which can be launched at intervals of less than 1 minute.
They are configured in the ttm__daemons
table.
activation_code
— this is the code that should return true
or false
. It determines whether the main code should be executed.
activation_interval
— the interval in seconds at which it runs if the previous activation code returned false
.
For example, set 5
seconds to check for tasks for the main code. You can set activation_code
as =: true
if you need to always immediately execute the daemon's main code.
daemon_code
— this is the main code that should perform a useful action.
pause
— this is the waiting interval before the next launch of activation_code
. That is, when activation_code
returned true
and then daemon_code
was executed, the system pauses for the number of seconds specified in pause
and checks activation_code
again. This interval is set significantly lower than the activation interval because if the daemon's main code was executed, there is likely more work for it.
After setting and specifying the codes, check by pressing do_it_now
and then activate in the Go-module by pressing activate
.
You can run several parallel daemons performing different tasks. But consider the number of processor cores available on your server. If only one or two cores are available, do not run heavy daemons, as they will block your system's operation.