insener
01-17-2004, 08:27 AM
Keywords: cron, crontab, exec(), sleep()
Server: Apache, PHP, MySQL
How to create dynamically generated table
time span 12:50:00 to 13:05:00
$start_time = 12:50:00;
$stop_time = 13:05:00;
$interval = 60;
$repeater = 2;
table ‘tasks’
id | time | code | action | status | created | lock
---------------------------------------------------------------------------------
3 | 12:52:00 | 303 | action3.php | idle | 2004-01-17 12:45:00 | false
2 | 12:51:00 | 202 | action2.php | idle | 2004-01-17 12:45:00 | false
1 | 12:50:00 | 303 | action3.php | done | 2004-01-17 12:45:00 | true
tasks
‘id=1’ $starttime (12:50:00)
‘id=2’ $starttime + $interval (60 seconds)
‘id=3’ last time (12:51:00) + $interval (60 seconds)
Server: Apache, PHP, MySQL
How to create dynamically generated table
time span 12:50:00 to 13:05:00
$start_time = 12:50:00;
$stop_time = 13:05:00;
$interval = 60;
$repeater = 2;
table ‘tasks’
id | time | code | action | status | created | lock
---------------------------------------------------------------------------------
3 | 12:52:00 | 303 | action3.php | idle | 2004-01-17 12:45:00 | false
2 | 12:51:00 | 202 | action2.php | idle | 2004-01-17 12:45:00 | false
1 | 12:50:00 | 303 | action3.php | done | 2004-01-17 12:45:00 | true
tasks
‘id=1’ $starttime (12:50:00)
‘id=2’ $starttime + $interval (60 seconds)
‘id=3’ last time (12:51:00) + $interval (60 seconds)