Releases: PhpGt/Cron
Cli improvements
CI and type safety improvements
This patch release includes three improvements:
- CI is handled by Github Actions now - you can check out the build history at https://github.com/PhpGt/Cli/actions
- PHPStan level 6 has been applied to the code, meaning certain type hints have been improved for greater readability and future maintainability.
- A minor bug was fixed thanks to the stricter types: crontab files that contained only comments would throw an exception prior to this release.
Have fun!
February update
Nothing exciting here, just an update to the dependencies and some tests for switching CI to Github Actions.
Stable release
Running your crontab during local development has proven to be extremely useful over the last few WebEngine projects that have been developed on internally.
Since the introduction of the last missing feature, the --now flag, there is no vital functioanlity outstanding preventing this repository from being marked as stable... so here it is, version 1.0.0 of the PHP cron runner.
Have fun, and stay productive!
Argument processing improvements
Utilising new functionality from PHP.Gt/Cli upstream, arguments on commands can now be nullable, which has the major improvement of not having to pass arguments with no value at the end of the argument list.
Terminology has been changed in this release to introduce --watch
and --now
. The watch argument continues the cron execution forever (similar to how PHP.Gt/Build works), and the now argument runs all cron tasks at the start of the execution, which is very useful when developing locally.
Function command execution
Static functions can now be called from the crontab file. Further tests have been written to ensure missing functions and scripts will be handled correctly.
Command execution
The final part of the functionality is in the testing phase. Commands that are listed within the crontab file are executed. This behaves exactly the same as the unix crontab, apart from the shell used is the current system shell, running as the calling user.
Improvements to tests
v0.2.1 Tidy up code
Stream reworking
The stream property is renamed to output
, and now streams are injected into the Command constructor.
Comments in crontab
Comments can be added to the crontab file. Any lines that start with a hash (#
) will be ignored when reading.