jobber examples: appending tasks
These examples show how tasks can be added/appended to the task queue. In principle this comprises two steps: task must be added to the task list and the task queue needs to be updated accordingly.
- The
append
action combines both steps. Tasks to be added are read from stdin. - The
refresh
action must be employed if the task list was extended by means outside jobber. - In both examples the
command shows the updated task list and the todo
action is used to demonstrate the extension the queue.
append
shell$cat task.list
sleep 1; echo '### this is task 1 ###' sleep 1; echo '### this is task 2 ###' sleep 1; echo '### this is task 3 ###' sleep 1; echo '### this is task 4 ###' sleep 1; echo '### this is task 5 ###' shell$jobber task.list init
[2022-04-04T17:45:15] appended 5 tasks shell$jobber task.list 3
[2022-04-04T17:45:15] 1.1 task.worker: sleep 1; echo '### this is task 1 ###' ### this is task 1 ### [2022-04-04T17:45:16] 1.1 exit status: 0 [2022-04-04T17:45:16] 2.2 task.worker: sleep 1; echo '### this is task 2 ###' ### this is task 2 ### [2022-04-04T17:45:17] 2.2 exit status: 0 [2022-04-04T17:45:17] 3.3 task.worker: sleep 1; echo '### this is task 3 ###' ### this is task 3 ### [2022-04-04T17:45:18] 3.3 exit status: 0 shell$jobber task.list todo
2 shell$echo "sleep 1; echo 'this is 1 more task'" | jobber task.list append
[2022-04-04T17:45:18] appended 1 tasks shell$cat task.list
sleep 1; echo '### this is task 1 ###' sleep 1; echo '### this is task 2 ###' sleep 1; echo '### this is task 3 ###' sleep 1; echo '### this is task 4 ###' sleep 1; echo '### this is task 5 ###' sleep 1; echo 'this is 1 more task' shell$jobber task.list todo
3 shell$
refresh
shell$cat task.list
sleep 1; echo '### this is task 1 ###' sleep 1; echo '### this is task 2 ###' sleep 1; echo '### this is task 3 ###' sleep 1; echo '### this is task 4 ###' sleep 1; echo '### this is task 5 ###' shell$jobber task.list init
[2022-04-04T17:46:00] appended 5 tasks shell$jobber task.list 3
[2022-04-04T17:46:00] 1.1 task.worker: sleep 1; echo '### this is task 1 ###' ### this is task 1 ### [2022-04-04T17:46:01] 1.1 exit status: 0 [2022-04-04T17:46:01] 2.2 task.worker: sleep 1; echo '### this is task 2 ###' ### this is task 2 ### [2022-04-04T17:46:02] 2.2 exit status: 0 [2022-04-04T17:46:02] 3.3 task.worker: sleep 1; echo '### this is task 3 ###' ### this is task 3 ### [2022-04-04T17:46:03] 3.3 exit status: 0 shell$jobber task.list todo
2 shell$echo "sleep 1; echo 'this is 1 more task'" >> task.list
shell$cat task.list
sleep 1; echo '### this is task 1 ###' sleep 1; echo '### this is task 2 ###' sleep 1; echo '### this is task 3 ###' sleep 1; echo '### this is task 4 ###' sleep 1; echo '### this is task 5 ###' sleep 1; echo 'this is 1 more task' shell$jobber task.list todo
2 shell$jobber task.list refresh
[2022-04-04T17:46:03] appended 1 tasks shell$jobber task.list todo
3 shell$