cron - How to add a Crontab without user input? -


i trying create program set crontab run program checks server's health. there way create new crontab without user input? i've tried bunch of ambitious things consisting of along lines of $echo "* * * * * /example" >> ~/crontab when run code permission denied error, when running under sudo call. know question similar has been asked on website, there no functional answer. there way automate adding crontabs? or necessary use contab -e , add via text editor?

crontab regular text file, can add entries tried. permission issue. either change crontab file permission or set caller script +s permission.

p.s. ~/crontab means file located in home directory. if call web user, home located in /var/www


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -