You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

timer-runner

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

timer-runner

a YAML-based configurable command line timer runner

0.0.9
latest
Source
npmnpm
Version published
Weekly downloads
17
Maintainers
1
Weekly downloads
 
Created
Source

timer-runner

Build Status npm version npm downloads

⏲🧝‍♂️️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
    

FAQs

Package last updated on 25 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts