Limitations of Jobs in FreePBX 15

I’m scheduling a task that needs to run once and then be deleted. There may be multiple tasks set by the module, all needing to operate with different parameters. I’m wondering if I’m missing some functionality of this new feature. Is there any way for a job to be self-aware? That is, be aware of its info (name, schedule, etc)?

At the moment, my thought is to name the job, e.g. myjob_2317 and store parameters in a KV store key 2317 (for a job scheduled to run at 11:17pm.) When the job is run, it can get the current time, and use that to find the KV store values and also delete itself.

There are a number of obvious problems with this approach, such as not being able to run the job early, and the possibility that prior jobs might run long enough to push into the next minute.

Any thoughts or workarounds?

I’d move this type of schedule processing “outside” of the FreePBX framework. If you want to get specific, there are plenty of people here that have experience with the underlying Centos/SNG7 operating system that might be able to make some specific recommendations.

Specifics? I’m resurrecting the phone restart module and adding the ability to schedule reboots overnight. It has to be managed from the web interface, so I don’t know how it could be taken outside. The method I outlined above works fine, but those obvious limitations are obvious.