How can a job, which is only to run once, be started immediately and not be restarted the next time JobScheduler is restarted?
The following script will start a job immediately and ensure that it will not be restarted:
The key here is an "undocumented" JobScheduler feature:
This starts the job immediately, even once JobScheduler has started.
The job is deleted by the post-processor (
function spooler_task_after()) in order to ensure that it will not be restarted the next time JobScheduler itself is restarted.
The post-processor can be omitted if it is not necessary to delete the job.
Insert the code for script that is to be executed in place of "
echo run once".
This solution means that it is no necessary to use a timestamp as a workaround.