Task
A task is a plugin located in ${MULLE_MONITOR_DIR}/libexec
. The filename is
the name of the task with '-task.sh' appended. This task file is a shell
script plugin, that is "sourced" into mulle-monitor. You are of course free
to call any other executable from this shell script.
The general expectation is, that a callback is very small and does not take long to execute. A task is something that is longer running and would be running as a background job.
It must contain a function called <task>_task_run()
, that will be called
by the monitor.
e.g. The task is "hello"
File ${MULLE_MONITOR_DIR}/libexec/hello-task.sh
:
hello_task_run()
{
echo "VfL Bochum 1848"
}
You can manage tasks using the mulle-monitor task
command.
If you're done with your task "hellow" and want to execute another task "world", do it like this:
hello_task_run()
{
echo "VfL Bochum 1848"
run_task_main "world"
}