
Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
After you got nodejs (which includes npm now), you can just:
`npm install -g chronos`
After this you may need to link node and chronos in your /bin
or /usr/bin
directory. Otherwise your cronjob may not be able to find them. To check, just create a cron like which node
and look into your mailbox.
chronos should be compatible with every service that supports AMQP. You can configure chronos by placing a JSON file in /etc/chronos.json
or /usr/local/etc/chronos.json
. Example:
{
"mode" : "amqp",
"amqp" : {
"host" : "10.0.13.1",
"port" : 5672,
"login" : "guest",
"password" : "guest",
"vhost" : "/",
"key" : "somekey"
},
"stage" : "production"
}
If you don't set one of those, the defaults apply. They mean that chronos will communicate with graylog2 directly, using a GELF service running locally on port 12201 (which is the default for a fresh install of graylog2).
{
"mode" : "graylog2",
"graylog2" : {
"host" : "127.0.0.1",
"port" : 12201
},
"amqp" : {
"host" : "127.0.0.1",
"port" : 5672,
"login" : "guest",
"password" : "guest",
"vhost" : "/",
"key" : "logging"
},
"stage" : false
}
Let's say your current crontab looks something like this:
0 * * * * date >> /var/log/cronjobs/myjob.log && php /var/www/myapp/cli/index.php --some=bar
If you just replace this by:
0 * * * * chronos -s mystage -j myjob 'php /var/www/myapp/cli/index.php --some=bar'
From now on chronos will log the results of your cronjobs to graylog2.
The cli options of chronos are:
/etc/chronos.json
is addedchronos -oj job1 'printf "This output will be added to the log"'
chronos -j job2 'printf "This will trigger an Error-level message"; exit 1;'
FAQs
Log cronjob results to graylog2
The npm package chronos receives a total of 17 weekly downloads. As such, chronos popularity was classified as not popular.
We found that chronos demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.