
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
crone: a little extension to cron with timezone support
OVERVIEW
Like cron, but you can further indicate the timezone, the period and interval to run a command (tested on python 2.6 but should be fine to run with older python release). See USAGE for more detailed information.
INSTALL
or
USAGE
Like cron, but you have more flexibility to scope down the time you want your commands executed. First of all, you have to ask cron to run crone.py every minute with something like:
In your cronetab file, you specify crone (cron with extension) tasks, like:
The first five conditions are exactly like cron. However, not all formats are supported. At the moment, something like 1, 1,2,3, 0-10, * and /2, including all of them combined like 1,2,,*/5,2-9 should work. The last fours are begin, end, interval (calculated from begin) and timezone conditions. Subject to this extension a command is executed iff the current time in the given timezone is within the period, i.e. begin to end (specified in format YYYY-mm-ddTHH:MM:SS) inclusively, and falls within the interval -- either day e.g. 7d, hour e.g. 7h or mintue e.g. 7m.
More examples of cronetab entries are shown below. Note that an entry prefixed with # will never ever be executed.
*/5 */1 * * * * * * Australia/Melbourne echo "Hello Melbourne!"
To view all possible arguments, you run python -m crone -h and will see things similar to below:
Usage: crone.py [options]
Options: -h, --help show this help message and exit -p PATH, --path=PATH path to the cronetab file (default is ~/.cronetab) -t TZPATH, --tzpath=TZPATH path to the timezone directory (default is /usr/share/zoneinfo) --concurrent run commands concurrentl (default if False)
You use -p to indicate the absolute path to your cronetab file, and you use -t to indicate the absolute path to the directory that contains timezone data. See http://www.linuxsa.org.au/tips/time.html for information about this topic. On my machine, the directory is /usr/share/zoneinfo, so it is default in crone. By default, crone executes commands in order, waiting for each to complete before executing the next. If you flag --concurrent, crone will executes commands in concurrent manner.
DEPENDENCIES
pyparsing (easy_install pyparsing) dateutil (easy_install python-dateutil)
CONTACT
If you have suggestions, reqeusts, etc, please feel free to create an issue in GitHub. Pull requests are also very much welcome.
RELEASE NOTE
1.0.0: Initial release. 1.0.1: Add more information, instruction, etc. 1.0.2: Resolve issues #1 and #2 (mostly about unit testing). 1.0.3: Resolve issues #3, #5, #6 and #7 (bug fixes and improvements).
FAQs
a little extension to cron with timezone support
We found that crone demonstrated a healthy version release cadence and project activity because the last version was released less than 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.