hi
i need to change crontab settings as
minute,hour,day of month,month year,day of week
certain times. for that i need to go as crontab -e. i want to avoid that as its creating many problems in mysystem.
so here i m planning/trying to write a script that will update the settings in crontab as per arguments from user.
can we do this?
plz any guidelines...
Thanks
Best Regards,
Swapneel
prior trying this take a backup of your crontab file
modify the changes to the crontab file backup
and then redirect the modified file as
crontab < filename
what problems ?
have u set the EDITOR?
its always better to modify cronjobs via crontab -e..
anyways
regards
abhijeet
hi abhijeet,matrixmadhan
see i have some shellcomads in crontab.
i my trying to write a script which will ask abt the
new time and new date ....
see here line numbers are same. measn if i say i want to edit 6th line of crontab i.i. monthlyprocess
so my script will chnage only that line.
thanks for your help
regards,
swapneel
thats what i have said!!!
whatever be the change you are going to make,
do it on the crontab entry file redirected through crontab -l
and once you are done with the changes redirect the file with changes to effect the crontab once again as mentioned in the previous post.
Just one thing. You have to restart cron for changes to take effect if you do not use the crontab command to edit the file. Check this thread where Perderabo has corrected me regarding this.
This is what Per had suggested in the ln you had provided
and Blow how is that different from what I had said ...
Kindly correct me if I am wrong.
Oh... I thought that the crontab meant the crontab file for the particular user. Got confused about that...
hi matrixmadhan
thanks dude. i got it.
its is working fine. thanks a lot.
Regards,
swapneel