Article 6CG6R [SOLVED] Can I execute multiple sequential commands in a cron using a semi-colon?

[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
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments