projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3be85e1
)
BackgroundJob: next_run_at vor Speichern berechnen, falls nicht gesetzt
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Tue, 28 Aug 2012 12:09:14 +0000
(14:09 +0200)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Tue, 28 Aug 2012 14:33:38 +0000
(16:33 +0200)
SL/DB/BackgroundJob.pm
patch
|
blob
|
history
diff --git
a/SL/DB/BackgroundJob.pm
b/SL/DB/BackgroundJob.pm
index
18f8e42
..
ce1c399
100644
(file)
--- a/
SL/DB/BackgroundJob.pm
+++ b/
SL/DB/BackgroundJob.pm
@@
-13,6
+13,15
@@
use SL::DB::BackgroundJobHistory;
use SL::BackgroundJob::Test;
use SL::System::Process;
+__PACKAGE__->before_save('_before_save_set_next_run_at');
+
+sub _before_save_set_next_run_at {
+ my ($self) = @_;
+
+ $self->update_next_run_at if !$self->next_run_at;
+ return 1;
+}
+
sub update_next_run_at {
my $self = shift;