1

I have been reading about using 'at' to schedule tasks from the command line based on start time here.

If I don't know how long tasks will take to complete, what is the best way to schedule consecutive tasks? In this case, I want to run several Torch7 scripts consecutively.

1

AFAIK you can enter multiple commands in a single at job, and they will be executed sequentially in the order in which you entered them - for example, using sleep to simulate an extended command:

$ at now +1 minute
warning: commands will be executed using /bin/sh
at> logger ": starting first job"; sleep 1m
at> logger ": starting second job"; sleep 1m
at> logger ": staring third job"
at> <EOT>
job 2 at Thu Aug 18 07:58:00 2016

results in

$ tail -f /var/log/syslog
Aug 18 07:58:26 xenial-vm steeldriver: : starting first job
Aug 18 07:59:26 xenial-vm steeldriver: : starting second job
Aug 18 08:00:26 xenial-vm steeldriver: : staring third job

Alternatively, you could create a wrapper script for your commands and schedule that in at

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.