crontab for windows
Project description
crontab-win
CRONTAB for windows.
Add crontab entries in a textfile and then this programs are executed as per schedule.
To use the crontab.txt, type crontab show or ctab show this will open the crontab.txt.
Edit this file to introduce tasks to be run by cron.
Each task to run has to be defined through a single line indicating with different fields when the task will be run and what command to run for the task
To define the time you can provide concrete values for minute (m), hour (h), day of month (dom), month (mon), and day of week (dow) or use '*' in these fields (for 'any').
Notice that tasks will be started based on the system notion of time and timezones.
Output of the crontab jobs (including errors) is shown to the user the crontab file belongs to (unless redirected).
For example, you can run a backup of all your user accounts at 5 a.m every week with:
0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
Read the blogpost about it
Installation
Install this tool using pip:
pip install crontab-win
Usage
For help, run:
crontab --help
You can also use:
python -m crontab --help
crontab syntax
┌───────────── minute (0 - 59)
│ ┌───────────── hour (0 - 23)
│ │ ┌───────────── day of the month (1 - 31)
│ │ │ ┌───────────── month (1 - 12)
│ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday;
│ │ │ │ │ 7 is also Sunday on some systems)
│ │ │ │ │
│ │ │ │ │
* * * * * command to execute
Start crontab at startup
create a batch file
@echo off
start /min ctab
and keep it in shell:startup folder.
Development
To contribute to this tool, first checkout the code. Then create a new virtual environment:
cd crontab-win
python -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
python -m pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file crontab_win-0.0.2.tar.gz.
File metadata
- Download URL: crontab_win-0.0.2.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c94c17914d82e0f1fbcb54bd9d195452da3769abf32ad8c8fba7570ca02649d
|
|
| MD5 |
04cc98769b6399b9c722d8bf9e447144
|
|
| BLAKE2b-256 |
13fa5a8091cefeaa38a54dd6a418fb62c9e826e124bd43167ee3b859a1abc85b
|
Provenance
The following attestation bundles were made for crontab_win-0.0.2.tar.gz:
Publisher:
publish.yml on sukhbinder/crontab-win
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
crontab_win-0.0.2.tar.gz -
Subject digest:
4c94c17914d82e0f1fbcb54bd9d195452da3769abf32ad8c8fba7570ca02649d - Sigstore transparency entry: 267371540
- Sigstore integration time:
-
Permalink:
sukhbinder/crontab-win@77fb33eb069a599384473f9c0688d21ac80faaf8 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/sukhbinder
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@77fb33eb069a599384473f9c0688d21ac80faaf8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file crontab_win-0.0.2-py3-none-any.whl.
File metadata
- Download URL: crontab_win-0.0.2-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a0b0fb06566a45be262f6941360d6b749c457bad4d071c87fd922b898fbd120
|
|
| MD5 |
70dcf10bb30117eeca2cb733c304fcaf
|
|
| BLAKE2b-256 |
0c0f540bc50f927b53ff0ea4b5545e915d89f5afe43ce6be58d74afff59ca5cf
|
Provenance
The following attestation bundles were made for crontab_win-0.0.2-py3-none-any.whl:
Publisher:
publish.yml on sukhbinder/crontab-win
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
crontab_win-0.0.2-py3-none-any.whl -
Subject digest:
8a0b0fb06566a45be262f6941360d6b749c457bad4d071c87fd922b898fbd120 - Sigstore transparency entry: 267371551
- Sigstore integration time:
-
Permalink:
sukhbinder/crontab-win@77fb33eb069a599384473f9c0688d21ac80faaf8 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/sukhbinder
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@77fb33eb069a599384473f9c0688d21ac80faaf8 -
Trigger Event:
release
-
Statement type: