- Forget about the concept of templates
- We create tasks directly from a json uploaded by admin, which is an array of task objects. The task object looks like below.
- Every time admin upload a new json, all executing tasks continues, all already scheduled tasks get cancelled, system is populated with tasks from new json. (We can further discuss the strategy used here)
- Database only keeps task execution history, including what is the command being executed, when task started / finished, which worker executed it, and if success or not
{
"id": "12345-67890-qwerty",
"command": "./build_zim.sh -args",
"scheduling": {
"repeat": true,