delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/09/17/13:22:16

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <414B1D41.7070400@x-ray.at>
Date: Fri, 17 Sep 2004 19:22:09 +0200
From: Reini Urban <rurban AT x-ray DOT at>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.8a3) Gecko/20040817
MIME-Version: 1.0
To: cygwin <cygwin AT cygwin DOT com>
Subject: automatic cronjaob injectsion
X-IsSubscribed: yes

I know that it might be possible and I know that is not advisable,
but may a cygwin postinstall script or just another helper script
install a cronjob automatically?

echo "$cronline" >> /var/cron/tabs/$USER
kill -HUP `cat /var/run/cron.pid`
crontab -e

Then change a bit in the job file, and save. voila.

A technical issue might be that cron will not react on -HUP. Does it?
I only look at the cron sources at linux some years ago.

I have for example this init.d snippet:

installcron() {
     echo "put this into your cronjob:"
     echo
     echo "*  */3 * * * /usr/bin/freshclam 2>&1 >/dev/null"
     echo "#*  */3 * * * /usr/bin/freshclam 2>&1 >/dev/null" >> 
/var/cron/tabs/$USER
     kill -HUP `cat /var/run/cron.pid`
     crontab -e
}


-- 
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019