1753265 Members
5540 Online
108792 Solutions
New Discussion юеВ

Regarding crontab

 
SOLVED
Go to solution
vind123
Regular Advisor

Regarding crontab

I am using a userid scp. I had modified the crontab file named scpcron that was running under this user id. I want to run the modified crontab file again. How do it. I want to replace with the new crontab file scpcron. I have listed below ways .Not sure whether is it correct. I need to login as user id scp and do any one of the below ways.

1. crontab -r
crontab scpcron

2. crontab -e
modify the file.

3. crontab scpcron

Also how do i to stop and start the cron?
2 REPLIES 2
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Regarding crontab

You don't start and stop cron.

The preferred method is this, as user scp (who presumably been entered in cron.allow):

crontab -l > scp.cron # dump the existing crontab to a text file
vi scp.cron # make any changes and save the file
crontab < scp.cron # read the textfile back into cron

The crontab command sends a SIGHUP to the cron daemon and this triggers a reconfiguration of the running daemon.
If it ain't broke, I can fix that.
vind123
Regular Advisor

Re: Regarding crontab

Thanks a lot for the info