This is the mail archive of the
cygwin
mailing list for the Cygwin project.
automatic cronjaob injectsion
- From: Reini Urban <rurban at x-ray dot at>
- To: cygwin <cygwin at cygwin dot com>
- Date: Fri, 17 Sep 2004 19:22:09 +0200
- Subject: automatic cronjaob injectsion
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/