1.0.0 • Published 13 days ago
@lanternfly/imogen v1.0.0
Imogen
Imogen is a Node based job scheduler build on top of Node Schedule.
Getting Started
- Install the package
@lanternfly/imogen
globally usingnpm install -g @lanternfly/imogen
. - Create a configuration file. See the Configuration section for more details.
- Run
imogen validate --config=<path to config file>
to validate the configuration file. See below for more information on configuration files. - Run
imogen run --config=<path to config file>
to run the job scheduler.
Configuration
Sample Configuration File
{
"jobs": [
{
"name": "job-1",
"time": "* * * * * *",
"command": "ls"
}
]
}
Configuration API
A configuration is a json file with the following fields:
Field | Type | Description | Is Required? | Default |
---|---|---|---|---|
jobs | Yes | |||
jobs[#].name | String | The name of the job. The name can only contain letters, numbers, dashes, and underscores. | No | |
jobs[#].time | String | Yes | ||
jobs[#].command | String | Yes | ||
jobs[#].overlap | Boolean | Flag for whether multiple instances of job can be executed at once. If true , multiple instances can run concurrently. If false , the next job will not be run until the previous instance has been completed. | No | True |
pino.options | Object | The options passed to pino when creating a logger. See Pino documentation for more details. | No | {} |
pino.destination | String / Object | The destination passed to pino when creating a logger. See Pino documentation for more details. | No | {} |
Officially Supported Node Versions
- 18.x
- 20.x
- 21.x