Data structure in this project
- schedule job
{
'schedule_name' : 'scheduleName',
'schedule_id' : 1,
'schedule_rule' : '* * * * * ',
'schedule_params' : 'php test.php',
'schedule_timeout' : 60
} - task
{
'task_name': 'scheduleName',
'schedule_id': '5',
'task_start': '1399950000',
'task_status': '1',
'task_created': '1399950000',
'task_id': '77',
'task_end': '1399950000',
'task_exit_code': '1'
}
Dependencies
Redis lib, run code to install :
npm install redis
Configurations
- change your enviroment by edit env.js
- find configuration file undef config and edit redis host & post
- run: node ./benches/addJob.js to adding a new job
Start!
run code:
node index.js
About author
Roban lee (robanlee at gmail dot com)
HTTP://WWW.RobanLee.COM