a helper to checkin/out jobcan automatically


Keywords
cli, helper, jobcan
License
ISC
Install
npm install jobcan-helper@1.1.10

Documentation

Download and use the executable

  1. Goto the release page: https://github.com/ysmood/jobcan-helper/releases

  2. Choose the right binary for your own platform: Windows or Mac

  3. Run the executable in cli and print help info with -h argument

    $ jobcan-helper -h
    
      Usage: jobcan-helper [options]
    
    
      Options:
    
        -V, --version                output the version number
        -u, --user <string>          E-mail or Staff Code
        -p, --password <string>      Password
        -c, --client <string>        Company ID
        -i, --schedule-in <string>   corn pattern default is check-in every weekday on 10:30 [30 10 * * *] (default: 30 10 * * *)
        -o, --schedule-out <string>  corn pattern default is check-out every weekday on 19:30 [30 19 * * *] (default: 30 19 * * *)
        -j, --jitter <number>        make the push time more like a human? default is randomly from 0-10min [10] (default: 10)
        -d, --holidays <string>      extra holidays to ignore, by default you don't have to use it, separated by comma, such as 1.21, 2.22-2.30
        -h, --help                   output usage information
    
      Example:
    
        read -s pass && jobcan-helper -u name -p $pass -c company
    
      Corn Pattern:
    
        *    *    *    *    *    *
        ┬    ┬    ┬    ┬    ┬    ┬
        │    │    │    │    │    │
        │    │    │    │    │    └ day of week (0 - 7) (0 or 7 is Sun)
        │    │    │    │    └───── month (1 - 12)
        │    │    │    └────────── day of month (1 - 31)
        │    │    └─────────────── hour (0 - 23)
        │    └──────────────────── minute (0 - 59)
        └───────────────────────── second (0 - 59, OPTIONAL)
    

Use as nodejs CLI tool

Make sure you installed node.js v9.2.0+

  1. install npm i -g jobcan-helper
  2. read help jobcan-helper -h

Better to run it inside pm2

Use as lib

import JobcanClient from 'jobcan-helper'