Revision 572adb38
Von Moritz Bunkus vor etwa 12 Jahren hinzugefügt
SL/DB/BackgroundJob.pm | ||
---|---|---|
13 | 13 |
use SL::BackgroundJob::Test; |
14 | 14 |
use SL::System::Process; |
15 | 15 |
|
16 |
__PACKAGE__->before_save('_before_save_set_next_run_at'); |
|
17 |
|
|
18 |
sub _before_save_set_next_run_at { |
|
19 |
my ($self) = @_; |
|
20 |
|
|
21 |
$self->update_next_run_at if !$self->next_run_at; |
|
22 |
return 1; |
|
23 |
} |
|
24 |
|
|
16 | 25 |
sub update_next_run_at { |
17 | 26 |
my $self = shift; |
18 | 27 |
|
Auch abrufbar als: Unified diff
BackgroundJob: next_run_at vor Speichern berechnen, falls nicht gesetzt