Socket
Socket
Sign inDemoInstall

@ariya/berkala

Package Overview
Dependencies
5
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @ariya/berkala

Run scheduled tasks


Version published
Maintainers
1
Install size
6.58 MB
Created

Readme

Source

Berkala

GitHub license Tests

Berkala runs scheduled tasks specified in a YAML-based configuration.

To get started, first download the binary for your operating system from the Releases page. Unpack the ZIP file and run the executable.

Since a config file does not exist yet, you will be offered to create one. Simply accept it and berkala.yml will be created, which may look like the following:

tasks:

  # Without an explicit interval, the task runs immediately
  boot:
    steps:
    - notify: Berkala starts now

  stay-hydrated:
    interval: every 1 hour
    steps:
    - notify: Drink some water! # TODO: how much?
    - print: Reminder was sent

  lunch:
    interval: at 11:58am
    steps:
    - notify: It's lunch time very soon
      title: Important
    - say: Get ready for lunch

  weekend-exercise:
    cron: 0 9 * * 6  # every 9 morning on Saturday
    steps:
    - notify: Time for some exercises!
      title: Stay healthy

Just like any regular YAML, everything from the # character until the end of the line will be ignored. Use this to insert comments.

The schedule for each task can be specified as:

If neither is explicitly stated, then the task runs right away.

Each task consists of one or more steps.

Every step must be one of the following:

print: displays a message to the standard output
notify: sends a desktop notification

The notification is supported on the following system:

say: converts text to audible speech

The text-to-speech conversion is supported on the following system:

Found a problem or have a new idea? File an issue!

Alternative way to run Berkala (with Node.js)

With Node.js v14 or later (that has npx):

npx @ariya/berkala

To run the development version, check out this repo and then:

npm install
npm start

npm version npm bundle size (minified)

Keywords

FAQs

Last updated on 12 Aug 2021

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc