@cimo/cronjob
v1.0.13
Published
Cronjob schedule. Light, fast and secure.
Maintainers
Readme
Npm_cronjob
Npm package, cronjob schedule. Light, fast and secure. Writed with native Typescript code and no dependencies are used.
Pack
- npm run build
- Copy the file "/build/package_name-x.x.x.tgz" in the project root folder.
- In the "package.json" file insert: "@cimo/package_name": "file:package_name-x.x.x.tgz"
Publish
- npm run build
- npm login --auth-type=legacy
- npm publish --auth-type=legacy --access public
Installation
- Link for npm package -> https://www.npmjs.com/package/@cimo/cronjob
Server
- Server.ts
...
import { Cc } from "@cimo/cronjob/dist/src/Main";
...
Cc.execute("./file/cronjob/");
...Example
- Create a folder "/file/cronjob/" in your root folder and add the file:
- xxx.json
{ "schedule": "*/1 * * * *", "command": "ls -la" } - Each file can execute only 1 instruction (it's possible execute all linux command).
