Crontab - automation tasks

Hello.

I am just wondering whether is possible run tasks one by one in cron?

e.g. Set time limit for 1st one task and others starting just after end previous.

Any help apreciated.

You sure can

Just put something like this in the crontab:

command1 && command2 && command3 …

basically just put && between different commands.

Mind you that if one of the commands fails, the execution of the complete chain stops (which is what you’d want in most cases). I’m not sure how to code it if you don’t want that.

ahh… forgot about it xD

Thanks.

I think you will be able to set up the crontab entry as:

(command1; command2; command3;)

The brackets set up a new shell, with commands 1 to 3 being executed sequentially, ignoring the return status.