diff --git a/README.md b/README.md index 9e98ab9..0ce746f 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,8 @@ You can use following jobs as an example: 0 0 * * * /usr/bin/php /path/to/point-tools/app/console point:update:subscriptions --all-users --env=prod ``` +See [`app/crontab`](https://bitbucket.org/skobkin/point-tools/src/master/app/crontab) for more advanced usage. + ## Setting Telegram webhook (to enable bot) ```bash diff --git a/app/crontab b/app/crontab new file mode 100644 index 0000000..f4f29a6 --- /dev/null +++ b/app/crontab @@ -0,0 +1,10 @@ +# Point-Tools +# Subscriptions +# Primary subscribers +*/10 * * * * flock -n /tmp/point_tools_sub_update.lock timeout 300 /usr/bin/php /var/www/point-tools/current/app/console point:update:subscriptions --env=prod +# App users +0 0 * * * flock -n /tmp/point_tools_sub_update_all.lock timeout 3600 /usr/bin/php /var/www/point-tools/current/app/console point:update:subscriptions --all-users --env=prod +# Other +# Restore users deleted by mistake +0 0 */7 * * flock -n /tmp/point_tools_restore_users.lock timeout 300 /usr/bin/php /var/www/point-tools/current/app/console point:users:restore --env=prod +