Imogen is a Node based job scheduler build on top of Node Schedule.
- 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.
{
"jobs": [
{
"name": "job-1",
"time": "* * * * * *",
"command": "ls"
}
]
}
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 | {} |
- 18.x
- 20.x
- 21.x