http://qs321.pair.com?node_id=737792


in reply to Re : A perl daemon
in thread A perl daemon

For handling signals, have a look at perlipc, especially the section entitled Handling the SIGHUP Signal in Daemons.

You probably want something like this (untested):

sub reload_cron { my $cron = shift; my $file = shift; $cron->clean_timetable; $cron->load_crontab($file); } { local $SIG{USR1} = sub { reload_cron($cron,$file) }; $cron->run; }
Then to signal the cron daemon, you need it's PID, and you can do:
kill $pid,10; # SIGUSR1

Hope this helps>