Whenever I need to enable crons, I will copy the cron file to the spool folder.
cp /home/shantanu/shantanu /var/spool/cron/
chown shantanu:root /var/spool/cron/shantanu
Will this work? Any issues I may face?
update: using CentOS
|
feedback
|
|
The official way to disable some cron jobs for specific user is type UPDATE
Try this:
| ||||
feedback
|
|
It may work. But.. As the previous posters said: Don't do this. Use So, don't do it this way. edit: And if you need to generate the crontab with a shell script, then just pipe your stuff into | ||||
|
feedback
|
|
Why not just use command | |||||||
feedback
|
|
This may or may not work depending on which operating system (and which version of cron) you are using. Checking some Linux boxes, their cron man page says this
So, providing the If though we look at a Solaris 10 box it's cron man page says this
So on a Solaris 10 system (and probably others) you would have to use the crontab command to change the files and inform cron that it should reread it's crontab files. | |||
|
feedback
|