0.0.9 ⢠Published 5 years ago
timer-runner v0.0.9
timer-runner
â˛đ§ââď¸ď¸a simple, YAML-based configurable timer runner
How To Use
Install timer globally
npm i timer-runner -g
Create timer.yml
name: timer script: timer-run watch: ./tasks env: LOGGER_LEVEL: debug error_file: ./logs/err.log out_file: ./logs/out.log merge_logs: true log_date_format: YYYY-MM-DD HH:mm:ss Z
Create a list of timer task with yaml in task dir
name: test rule: hour: 2 minute: 0 dayOfWeek: [0, 1, 2, 3, 4, 5, 6] api: url: https://abc.com/sign method: post headers: host: https://abc.com origin: https://abc.com content-type: application/x-www-form-urlencoded cookie: $secret x-requested-with: https://abc.com data: api_version: 1 app_client_id: 1
Start the timer with pm2
pm2 start timer.yml