DEV Community


Discussion on: crontab -; ?

devtalhaakbar profile image
Muhammad Talha Akbar • Edited

Hope it wasn't a production server. Otherwise, it's hilarious.

From the manpage, the crontab has two forms:

crontab [-u user] file
crontab [-u user] { -l | -r | -e }
Enter fullscreen mode Exit fullscreen mode

The first form of this command is used to install a new crontab from some named file or standard input if the pseudo-filename `-' is given.

It's possible the command above got interpreted as the first form and a new crontab with just ; inside of it was installed.

Apart from guess above, I have no idea. But, it's interesting. Glad I am no longer around servers.

spwlsldi profile image
Hye Jin Author

Thanks for the reply! Well thankfully we were working in our development server so everyone is safe!

I wasn't aware of the first form so it's something new for me that I need to look up. Thanks for the help!