Have been thinking on this for a while. I think we can use yaml, something like:
--- - name: myjob1 command: ./mycommand.sh image: tf-buster-std - name: myscheduledjob command: ./myothercommand.sh image: tf-buster-whatever schedule: * * * * * - name: mycontinuousjob command: ./myneverendingcommand.sh image: tf-buster-whatever continuous: true
Other alternative I have been considering is having the CLI be kind of an interpreter, so you could basically chain commands in a file:
tool@toolforge:~$ cat file.txt flush run myjob1 --image tb-buster-std --command ./mycommand.sh run myjob2 --image whatever --command whatever --schedule "*/1 * * * *" run myjob3 --image whatever --command whatever --continuous run myjob4 --image whatever --command whatever --wait delete myjob3 tool@toolforge:~$ toolforge-jobs load file.txt
This last option seems a bit over-engineered at this point, but could enable some interesting use cases. The same can be achieved with a simple shell script anyway, so I'm basically discarding that.