Skip to main content
1 of 3
Unix-Ninja
  • 792
  • 6
  • 6

The use of && is actually a shell operator meant to be interpreted by bash. This will not work in cron. Generally speaking, if you want to run multiple commands in a single cron task, you really should put them in a script.

If you are truly intent on running them inline, you can do something like the following: bash -c 'whoami && which whoami'

But again, at that point you should really be placing your commands in a shell script.

Unix-Ninja
  • 792
  • 6
  • 6