@universis/robot

3.1.0 • Public • Published

@universis/robot

A task runner for Universis project based on bree task scheduler

Installation

Start an instance of @universal/robot by executing the following command:

npx @universis/robot

This installs the package and starts the task runner with the default configuration. @universis/robot starts its own application server and listens for incoming requests.

Use the --port option to specify a different port. The default port is 5445.

npx @universis/robot --port 6000

Use the --host option to specify the host on which the application server listens for incoming requests. The default host is localhost

npx @universis/robot --port 6000 --host "0.0.0.0"

Use the --config option to specify the path to the jobs configuration file.

npx @universis/robot --config /path/to/config.json

Configuation

The configuration file is a JSON file that contains the jobs to be scheduled. The following is an example of a configuration file:

{
  "jobs": [
    {
      "name": "job1",
      "interval": "1 hour",
      "path": "/path/to/job1.js"
    },
    {
      "name": "job2",
      "timeout": "8 hours",
      "path": "/path/to/job2.js"
    }
  ]
}

Read more about bree job scheduling here

Examples

Universis robot example is a simple project of how to use @universis/robot to schedule jobs. It contains only one job that gets stats for students grouped by their student status.

Development

Clone the repository and install the dependencies:

git clone https://gitlab.com/universis/robot.git
cd robot
npm install

@universis/robot uses jasmine for testing. Run the tests with the following command:

npm test

Start the application with the following command:

npm start

Readme

Keywords

none

Package Sidebar

Install

npm i @universis/robot

Weekly Downloads

57

Version

3.1.0

License

LGPL-3.0-or-later

Unpacked Size

4.22 MB

Total Files

82

Last publish

Collaborators

  • universis