MCHAppy
MCHAppy

Reputation: 1002

run script every n minutes without editing crontab file manually

Is there a command that can edit crontab ? ( I don't want to edit it manually )

For example :

command -parameter * * * * * script

Upvotes: 0

Views: 184

Answers (1)

Akos Bannerth
Akos Bannerth

Reputation: 1994

The command crontab file will set the crontab to the contents of the given file - if the lines in it are properly formatted (otherwise it will just give an error).

You can use - instead of a filename to read from the standard input, e.g.:

echo "* * * * * script" | crontab -

Upvotes: 1

Related Questions