[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Switching Crontab Files Via At



also sprach Martin McCormick <martin@dc.cis.okstate.edu> [2006.09.01.2258 +0200]:
> 	The actual crontab file for a given user has a warning
> about not editing it directly.  When you use crontab -e, the
> application takes care of installing the new crontab for the
> user and appears to do a kill -HUP on cron to get it to load the
> new crontab for that user.

I don't think it sends a SIGHUP. In fact, I don't think it can
because it does not run with root permissions.

> 	Suppose one wants to run a particular crontab while on
> vacation or during some other unusual time period and then switch
> back to a "normal" crontab.  Is it safe to make at cp a new
> version of crontab to /var/spool/crontabs/user and then do a KILL
> -HUP on cron's PID?

cron will reload automatically every minute.

If you can ensure that there are no syntax errors in the file you
install manually, then yes, it should be safe. The reason why this
note is there is because crontab does syntax checks on the
user-submitted file.

There's also

  crontab -l | crontab -

...

-- 
Please do not send copies of list mail to me; I read the list!
 
 .''`.   martin f. krafft <madduck@debian.org>
: :'  :  proud Debian developer, author, administrator, and user
`. `'`   http://people.debian.org/~madduck - http://debiansystem.info
  `-  Debian - when you have better things to do than fixing systems
 
NP: Incredible Expanding Mindfuck / Incredible Expanding Mindfuck

Attachment: signature.asc
Description: Digital signature (GPG/PGP)


Reply to: