From 845097f7eab01e8cca63927e7813a6a5280f6878 Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Wed, 18 Jan 2017 04:34:24 +0300 Subject: [PATCH] crontab added for future deployment integration. --- README.md | 2 ++ app/crontab | 10 ++++++++++ 2 files changed, 12 insertions(+) create mode 100644 app/crontab 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 +