Link to home
Start Free TrialLog in
Avatar of AndriesKeun
AndriesKeun

asked on

Edit Cron Job

Hi there

Dont know too much linux.

I want to add a new cron job to a currently running one. I found where it is stored: /var/spool/cron.

However when I try to edit it using 'vi' it tells me:

DO NOT EDIT THIS FILE - edit the master and reinstall.

Can I edit it? If not how do I go about doing it.

Many Thanks
Avatar of pjedmond
pjedmond
Flag of United Kingdom of Great Britain and Northern Ireland image

crontab -e

and you'll end up editing your crontab:)
Guess you ought to read:

man crontab

as well:)

(   (()
(`-' _\       It's supposed to be a mouse!
 ''  ''
Avatar of AndriesKeun
AndriesKeun

ASKER

when i use crontab -e i also get the message: DO NOT EDIT THIS FILE - edit the master and reinstall.

in the directory: /var/spool/cron. there are a couple of files, one of which when i edit it there are two jobs in there, and i know for certain that these jobs run, however when i use crontab -e there are 5 jobs there, and the two that i know run are not in there. so you see, im a bit confused?



sorry, my mistake, i just switched user.

but I still get the message: DO NOT EDIT THIS FILE - edit the master and reinstall. when i use cronatab -e, so yes or no answer, Is it cool if i edit this file? I cant afford to stuff it up.
ASKER CERTIFIED SOLUTION
Avatar of pjedmond
pjedmond
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes - using "crontab -e" is the correct way to edit your user crontab.

(   (()
(`-' _\
 ''  ''
perferct, thanks