[SOLVED] Can I execute multiple sequential commands in a cron using a semi-colon?
by wh33t from LinuxQuestions.org on (#6CG6R)
Is that how it works?
Example
Code:*/15 * * * * date > log.file; apt update >> log.file; date >> log.fileEvery 15 minutes
1. print the date and pipe output to create/overwrite log.file
2. update apt and pipe append output to log.file
3. print the date and pipe append output to log.file (this lets me know how long the apt update command took to finish
Example
Code:*/15 * * * * date > log.file; apt update >> log.file; date >> log.fileEvery 15 minutes
1. print the date and pipe output to create/overwrite log.file
2. update apt and pipe append output to log.file
3. print the date and pipe append output to log.file (this lets me know how long the apt update command took to finish