@mtakla/cronops 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -5
- package/dist/tasks/JobLoader.js +1 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -46,8 +46,10 @@ All configured via simple, version-controllable ***.yml** based **job definition
|
|
|
46
46
|
|
|
47
47
|
CronOps is built and optimized to run as a Docker container itself.
|
|
48
48
|
|
|
49
|
+
To download and start
|
|
50
|
+
|
|
49
51
|
```sh
|
|
50
|
-
docker run \
|
|
52
|
+
docker run -d \
|
|
51
53
|
--name cronops \
|
|
52
54
|
-p 8083:8083 \
|
|
53
55
|
-v ./config:/config \
|
|
@@ -58,7 +60,7 @@ docker run \
|
|
|
58
60
|
ghcr.io/mtakla/cronops:latest
|
|
59
61
|
```
|
|
60
62
|
|
|
61
|
-
To check if the server is running
|
|
63
|
+
To check if the server is running
|
|
62
64
|
|
|
63
65
|
```sh
|
|
64
66
|
docker logs -f cronops
|
|
@@ -86,7 +88,14 @@ target:
|
|
|
86
88
|
Now you can add more job configuration files to `./config/jobs`. For detailes, see [job configuration](#job-configuration) section below.
|
|
87
89
|
|
|
88
90
|
🛈 **Note**
|
|
89
|
-
> You don't need to restart the server after changing job files. The server identifies any changes and will hot reload the configuration.
|
|
91
|
+
> You don't need to restart the server after changing job files. The server identifies any changes and will automatcally hot reload the configuration.
|
|
92
|
+
|
|
93
|
+
To pull latest release of CronOps
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
docker pull ghcr.io/mtakla/cronops:latest
|
|
97
|
+
```
|
|
98
|
+
|
|
90
99
|
|
|
91
100
|
### Using Docker Compose
|
|
92
101
|
|
|
@@ -413,8 +422,6 @@ If the exec action is configured to run on selected `source` files:
|
|
|
413
422
|
| `verbose` | (*Optional*) Enable verbose logging for this job. Default: `false` |
|
|
414
423
|
| `enabled` | (*Optional*) If `false`, the job will not be scheduled. Default: `true` |
|
|
415
424
|
|
|
416
|
-
|
|
417
|
-
|
|
418
425
|
## Security considerations
|
|
419
426
|
|
|
420
427
|
🛈 **Note**
|
package/dist/tasks/JobLoader.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import os from "node:os";
|
|
2
1
|
import fsx from "fs-extra";
|
|
3
2
|
import YAML from "yaml";
|
|
4
3
|
import glob from "fast-glob";
|
|
@@ -17,7 +16,7 @@ export class JobLoader extends AbstractTask {
|
|
|
17
16
|
jobHistory;
|
|
18
17
|
constructor(options = {}) {
|
|
19
18
|
super("*/8 * * * * *");
|
|
20
|
-
this.configDir = resolve(options.configDir ?? process.env[ENV.CONFIG_DIR] ??
|
|
19
|
+
this.configDir = resolve(options.configDir ?? process.env[ENV.CONFIG_DIR] ?? "./config");
|
|
21
20
|
this.jobHistory = new FileHistoryModel();
|
|
22
21
|
}
|
|
23
22
|
async run() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mtakla/cronops",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Automated cross-container file lifecycle management with cron scheduling",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "mtakla@nevereven",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"build": "tsc",
|
|
87
87
|
"build:types": "tsc --declaration",
|
|
88
88
|
"dev": "tsc --sourceMap --inlineSources && node --env-file=.env.local ./dist/server.js",
|
|
89
|
-
"docker": "docker build --load --target app -t cronops
|
|
89
|
+
"docker": "docker build --load --target app -t cronops:local .",
|
|
90
90
|
"docker:docs": "docker build --load --target docs -t cronops-docs:local ."
|
|
91
91
|
}
|
|
92
92
|
}
|