Changeset 52 for trunk/www/task.php
- Timestamp:
- Jun 20, 2009, 6:22:13 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/task.php
r41 r52 24 24 chdir($Config['BaseDir']); 25 25 $DbResult = $this->Database->query('SELECT * FROM Task WHERE State = 0 ORDER BY Id,TimeCreate ASC'); 26 $this->Database->query('UPDATE Task SET State=2 WHERE State=1'); // Change not finished running tasks to finished27 $this->Database->query('UPDATE Task SET TimeEnd=NOW() WHERE State=2 AND TimeEnd = NULL'); // Set end time to finished tasks28 26 while($Task = $DbResult->fetch_assoc()) 29 27 { … … 45 43 function ProcessAllCycle() 46 44 { 45 $this->Database->query('UPDATE Task SET State=2 WHERE State=1'); // Change not finished running tasks to finished 46 $this->Database->query('UPDATE Task SET TimeEnd=NOW() WHERE State=2 AND TimeEnd = NULL'); // Set end time to finished tasks 47 47 while(1) 48 48 {
Note:
See TracChangeset
for help on using the changeset viewer.