diff options
author | Jarle Bjørgeengen <jarle@bjorgeengen.net> | 2010-03-01 19:19:13 +0000 |
---|---|---|
committer | Jarle Bjørgeengen <jarle@bjorgeengen.net> | 2010-03-01 19:19:13 +0000 |
commit | 5d0c49f51cd2dab374947f684a119bd85e380162 (patch) | |
tree | 2879e52437303d7c28ef096b8e7f2b0372aa4ddb | |
parent | e468f91c73659940fe2a5da853a72a3f6890d430 (diff) |
Let scheduler die at midnight to be restarted with updated program by cron
-rwxr-xr-x | frikanalen/bin/scheduler | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/frikanalen/bin/scheduler b/frikanalen/bin/scheduler index ffc63e3..d492aa4 100755 --- a/frikanalen/bin/scheduler +++ b/frikanalen/bin/scheduler @@ -275,6 +275,12 @@ if ( $opts{"s"} ) { } #print Dumper(@events); + my $suicide_time = `date -d 23:59 +%s`; + Event->timer(at => $suicide_time, + data => {}, + cb => sub { + die "Sucide at midnight\n"; + }); Event::loop(); exit 0; } |