I've got some long running scheduled actions set up.
I'm using
config.get("limit_time_cpu")
and compare it to the current script execution duration on each iteration. This works fine as long as the task is executed automatically by the scheduler, however the limit it reaches when run manually (Settings -> Technical -> Scheduled Actions) is different (=> limit_time_real).
Is there a way get to know whether the script was executed manually or automatically? uid seems to be one possible option but it doesn't feel right to rely on it.