Cron task from cmdline?
Hi, all!
I would like to know if it is possible to add new task for crontab from command line?
For example I could do:
#echo ''0 15 * * * some_command_to_execute'' >> //var/spool/cron/crontabs/root
But how it could be for simple, not super-user?
Thanx, Lekha
Yes, $crontab -e will put me in vi mode. Problem that I should put command from file to cron tasks. C++ programm will read & prepare cron style string, but how to put this string into cron?!
I have no ideas
Lekha
I have no ideas
Lekha
October 03, 2002 04:31 AM
quote: Original post by Vasialek
Yes, $crontab -e will put me in vi mode. Problem that I should put command from file to cron tasks. C++ programm will read & prepare cron style string, but how to put this string into cron?!
I have no ideas
(crontab -l; echo ''0 15 * * * some_command_to_execute'') | crontab -
October 03, 2002 04:39 AM
Oh, and following up to myself - on non-Debian systems that''ll add a copy of the "DO NOT EDIT THIS FILE" header every time it''s run. If you''re on a non-debian system, a "| tail +4" placed somewhere in that command line might be helpful.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement