Download the PHP package sharkom/yii2-cron without Composer
On this page you can find all versions of the php package sharkom/yii2-cron. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package yii2-cron
Yii2 Cron job Manager
Create Cron jobs from browser, and look that run logs
Forked from vasadibt/yii2-cron with some modifications:
- Now it can run every kind of script, not only Yii2 console commands
- Added capability to have a log file in addition to DB logs
- Removed the runquick capabilities
ChangeLog 27/Feb/2023
- Add Manual Run button on cronjob page
- Add auto purge logs (use module param purge_log_interval | default 3 months)
- Fix some graphics in logs pages
ChangeLog 5/May/2023
- Added execution error mail notifications
- Added auto unlock mail notifications
- Added module param sendNotifications
Installation
The preferred way to install this extension is through composer.
Either run
or add
to the require section of your composer.json
file.
Migration
Run the following command in Terminal for database migration:
Or use the namespaced migration (requires at least Yii 2.0.10):
Then run:
Web Application Config
Turning on the Cron Job Manager Module in the web application:
Simple example:
Console Application Config
Turning on the Cron Job Manager Module in the console application:
Simple example:
Schedule Config
Set the server schedule to run the following command
On Linux:
Add to the crontab with the user who you want to run the script (possibly not root) with the crontab -e
command or by editing the /etc/crontab
file
On Windows:
Open the task scheduler and create a new task
Email notifications
In order to recieve email notifications for execution errors you need to config:
- The module param sendNotifications to true (check Web App and Console App configuration in this readme)
- Set in common/config/params.php the parameters:
- senderEmail
- NotificationsEmail
- Configure the mailer in common/config/main-local.php
.
All versions of yii2-cron with dependencies
symfony/process Version ^5.0
dragonmantank/cron-expression Version ^1.2
kartik-v/yii2-grid Version @dev
sharkom/yii2-cronjob-widget Version ^1