cron expressions are not easy to understand and write,
Chronis will help you define
cron jobs using natural language and will generate crontab files for you.
This will also allow you to
verison control your cron job definitions in a structured
file (YAML) and generate crontabs during your
PHP 7 is required for
Chronis to run.
Chronis in your PHP project:
composer require mylk/chronis
You can also install
Chronis as a global command and not as a project's dependency:
composer global require mylk/chronis
Chronis and get some help:
Chronis when installed as a global command, first make sure that
$HOME/.config/composer/vendor/bin/ is in your system's
$PATH. Then you can
Chronis from anywhere:
Then, you will need to have a
yaml file to define your cron jobs. You can begin with
this as an example.
To dump the crontab:
vendor/bin/chronis dump --config=YOUR_YAML_FILE_PATH
To export the crontab:
vendor/bin/chronis export --config=YOUR_YAML_FILE_PATH --output=my_crontab
--output argument is not necessary. If not given, the crontab will be exported to a file
crontab in the current directory.
Chronis is open source and of course you can contribute. Just fork the project, have fun
and then create a pull request.
Makefile has been created to group some tasks needed for development. Find those tasks below.
Running the tests
Coding style checks
The coding style that is followed is PSR-2.
- symfony/console - The library used for the command line interface
- bpolaszek/natural-cron-expression - The library that converts the natural language to cron expressions
- symfony/yaml - The library used to read the YAML configuration of your cron jobs
- symfony/dependency-injection - The library that instantiates the sevices used in the project
See the list of contributors.
This project is licensed under the GPLv2 License - see the LICENSE file for details.