Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
cron-translate
Advanced tools
Translate english to cron expressions
Install cron-translate
npm install --save cron-translate
const cronTranslate = require('cron-translate');
let cron = cronTranslate.toCron('every minute');
cron-translate
allows to use some fields and operators to compose the expressions that are translatable to cron expressions
The allowed fields are second
, minute
, hour
, day
, month
, week day
, or the plurals seconds
, minutes
, hours
, days
, months
, week days
.
every <field>
: sets the field value to *
. e.g: every day
;every <value> <field>
: sets the field value to */<value>
. e.g: every 10 minutes
;every <field> <value>
: sets the field value to <value>
. e.g: every hour 2
;every <field> value
:
on <field> <value>
: sets the field value to <value>
. e.g: on hour 2
;from <field> <value1> to <value2>
: It sets the field value <value1>-<value2>
. e.g: from minute 2 to 10
;The allowed values are:
monday
and mon
are the same.every second
is converted to * * * * * *
;every minute
is converted to 0 * * * * *
;every hour
is converted to 0 0 * * * *
;every sunday
is converted to 0 0 0 * * sunday
;every january
is converted to 0 0 0 * january *
;every 2 minutes
is converted to 0 */2 * * * *
;every day 10
is converted to 0 0 0 10 * *
;on minute 2
is converted to 0 2 * * * *
;on sat
is converted to 0 0 0 * * sat
;from minute 2 to 30
is converted to 0 2-30 * * * *
;The expressions may be combined to create complex cron expresions:
every 10 minutes from hour 2 to 8
is converted to 0 */10 2-8 * * *
;every monday on hour 2 from minute 10 to 20
is converted to 0 10-20 2 * * monday
;FAQs
Translates text to cron expression
The npm package cron-translate receives a total of 1 weekly downloads. As such, cron-translate popularity was classified as not popular.
We found that cron-translate 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.