SiT! Bugs

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001915SiT!schedulerpublic2014-02-06 14:452014-02-06 14:45
Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
PlatformWindowsOSWindows ServerOS Version2000+Later
Product Version3.67 LTS 
Target VersionFixed in Version 
Summary0001915: Condition in schedule_actions_due
I think the following line in the function schedule_actions_due()
     $sql .= "AND IF(UNIX_TIMESTAMP(laststarted) > 0, UNIX_TIMESTAMP(lastran), -1) <= IF(UNIX_TIMESTAMP(laststarted) > 0, UNIX_TIMESTAMP(laststarted), 0)";
has no sense, because ....
1 - When the job is running the condicion results in TRUE, and the job will be selected to run again,
    which is not the intention of this function ! (lastran < laststarted)
2 - When the job is not running the condicion is true: ok.
I thought to change this line to:
    $sql .= "AND IF(UNIX_TIMESTAMP(laststarted) > 0, UNIX_TIMESTAMP(laststarted), -1) <= IF(UNIX_TIMESTAMP(laststarted) > 0, UNIX_TIMESTAMP(lastran), 0)";
but this situation never exists, because the function schedule_action_done updates both fields in one sql.

I think the original intention of the programmer is to check that the job is NOT running, like this:
    $sql .= "AND laststarted = NULL";
Please inform me of the correct solutuon.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2014-02-06 14:45 Frans New Issue

Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker