GithubHelp home page GithubHelp logo

woodpecker's Introduction

Woodpecker

Woodpecker is cron runner on 'Deno'.

⚠ Caution

It may be subject to significant changes dependent on changes in the Deno.cron specification.

Usage

$ deno -V
deno 1.38.0

$ deno run --allow-read --unstable https://deno.land/x/woodpecker/cli.ts

#or

$ deno install --name=woodpecker --allow-read --unstable https://deno.land/x/woodpecker/cli.ts
$ woodpecker

🎉Test Pass file: ./woodpecker_config.jsonc
Scheduled cron job[Cron job 1]: * * * * *: file:/usr/src/app/cron_task.ts#job
Scheduled cron job[Cron job 2]: * * * * *: file:/usr/src/app/cron_task_2.ts#job2
START cron. file: woodpecker_config.jsonc
Execute cron job[Cron job 1]: * * * * *: file:/usr/src/app/cron_task.ts#job
Call cron job 1.
Execute cron job[Cron job 2]: * * * * *: file:/usr/src/app/cron_task.ts#job2
Call cron job 2.


$ deno run --allow-read --unstable-cron https://deno.land/x/woodpecker/cli.ts -h

Usage:
  deno run --allow-read --unstable-cron https://deno.land/x/woodpecker/cli.ts # default config file is 'woodpecker_config.jsonc'
  deno run --allow-read --unstable-cron https://deno.land/x/woodpecker/cli.ts --config=same.json(c)
  deno run --allow-read https://deno.land/x/woodpecker/cli.ts -t
  deno run --allow-read https://deno.land/x/woodpecker/cli.ts -t --config=same.json(c)
  deno run --allow-read https://deno.land/x/woodpecker/cli.ts -test
  deno run --allow-read https://deno.land/x/woodpecker/cli.ts -test --config=same.json(c)
  deno run https://deno.land/x/woodpecker/cli.ts -c >> same.jsonc
  deno run https://deno.land/x/woodpecker/cli.ts --create >> same.jsonc
  deno run https://deno.land/x/woodpecker/cli.ts -h
  deno run https://deno.land/x/woodpecker/cli.ts -help

Config file

{
  "jobs": [
    {
      "name": "Cron job 1",
      "schedule": "* * * * *",
      "source": "/usr/src/app/cron_task.ts"
    },
    {
      "name": "Cron job 2",
      "schedule": "* * * * *",
      "source": "/usr/src/app/cron_task_2.ts",
      "funcName": "job2",
      "backoffSchedule": [3000, 6000]
    }
  ]
}
  • source is an absolute path.
  • funcName is optional. Default is job.
  • backoffSchedule is optional.

woodpecker's People

Contributors

octo8080x avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.