Refactoring: SL::Template: Parameterübergabe als Hash, nicht positionsabhängig (Teil 2)
[kivitendo-erp.git] / SL / BackgroundJob / BackgroundJobCleanup.pm
1 package SL::BackgroundJob::BackgroundJobCleanup;
2
3 use strict;
4
5 use parent qw(SL::BackgroundJob::Base);
6
7 use SL::DB::BackgroundJob;
8
9 sub create_job {
10   $_[0]->create_standard_job('0 3 * * *'); # daily at 3:00 am
11 }
12
13 sub run {
14   SL::DB::Manager::BackgroundJob->cleanup;
15
16   return 1;
17 }
18
19 1;
20
21 __END__
22
23 =encoding utf8
24
25 =head1 NAME
26
27 SL::BackgroundJob::BackgroundJobCleanup - Background job for
28 cleaning the background job table of all executed one time jobs
29
30 =head1 SYNOPSIS
31
32 This background job deletes old entries from the table
33 C<background_jobs>. This happens to background jobs that were
34 supposed to run only once and were already run.
35
36 The job is supposed to run once a day.
37
38 =head1 BUGS
39
40 Nothing here yet.
41
42 =head1 AUTHOR
43
44 Sven Schöling E<lt>s.schoeling@linet-services.deE<gt>
45
46 =cut