Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
10f967e0
Commit
10f967e0
authored
10 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
FIX #2519
parent
16a620f9
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
htdocs/install/mysql/tables/llx_cronjob.sql
+5
-5
5 additions, 5 deletions
htdocs/install/mysql/tables/llx_cronjob.sql
scripts/cron/cron_run_jobs.php
+3
-3
3 additions, 3 deletions
scripts/cron/cron_run_jobs.php
with
8 additions
and
8 deletions
htdocs/install/mysql/tables/llx_cronjob.sql
+
5
−
5
View file @
10f967e0
...
@@ -33,10 +33,10 @@ CREATE TABLE llx_cronjob
...
@@ -33,10 +33,10 @@ CREATE TABLE llx_cronjob
md5params
varchar
(
32
),
md5params
varchar
(
32
),
module_name
varchar
(
255
),
module_name
varchar
(
255
),
priority
integer
DEFAULT
0
,
priority
integer
DEFAULT
0
,
datelastrun
datetime
,
datelastrun
datetime
,
-- date last run and when should be next
datenextrun
datetime
,
datenextrun
datetime
,
-- job will be run if current date higher that this date
datestart
datetime
,
datestart
datetime
,
-- before this date no jobs will be run
dateend
datetime
,
dateend
datetime
,
-- after this date, no more jobs will be run
datelastresult
datetime
,
datelastresult
datetime
,
lastresult
text
,
lastresult
text
,
lastoutput
text
,
lastoutput
text
,
...
...
This diff is collapsed.
Click to expand it.
scripts/cron/cron_run_jobs.php
+
3
−
3
View file @
10f967e0
...
@@ -127,9 +127,9 @@ if(is_array($object->lines) && (count($object->lines)>0))
...
@@ -127,9 +127,9 @@ if(is_array($object->lines) && (count($object->lines)>0))
// Loop over job
// Loop over job
foreach
(
$object
->
lines
as
$line
)
foreach
(
$object
->
lines
as
$line
)
{
{
//If date_next_jobs is less of current date, execute the program, and store the execution time of the next execution in database
//If
date
_
next
_jobs is less of current dat, execute the program, and store the execution time of the next execution in database
if
((
$line
->
datenext
run
<
$now
)
&&
(
empty
(
$line
->
datestart
)
||
$line
->
datestart
<=
$now
)
&&
(
empty
(
$line
->
dateend
)
||
$line
->
dateend
>=
$now
))
if
((
$line
->
datenextrun
<
$now
)
&&
$line
->
dateend
<
$now
)
{
{
$cronjob
=
new
Cronjob
(
$db
);
$cronjob
=
new
Cronjob
(
$db
);
$result
=
$cronjob
->
fetch
(
$line
->
id
);
$result
=
$cronjob
->
fetch
(
$line
->
id
);
if
(
$result
<
0
)
{
if
(
$result
<
0
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment