-
Notifications
You must be signed in to change notification settings - Fork 0
/
cron
59 lines (45 loc) · 2.53 KB
/
cron
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
## 🚨 WARNING 🚨
#
# This file is under version control!
# DO NOT EDIT DIRECTLY - If you do, you'll loose your changes!
#
# The original file is in `/var/www/turbolab.it/config/custom/prod/`
#
# You MUST:
#
# 1. edit the original file on you PC
# 2. Git-commit+push the changes
# 3. run `sudo bash /var/www/turbolab.it/scripts/deploy.sh`
#
# ⚠️ This file is for the PROD env only ⚠️
#
# 🪄 Based on https://github.com/TurboLabIt/webstackup/blob/master/my-app-template/config/custom/cron
MAILTO=""
SHELL=/usr/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
PROJECT_DIR=/var/www/turbolab.it/
SCRIPT_DIR=/var/www/turbolab.it/scripts/
LOG_PATH=/var/www/turbolab.it/var/log/cron_
## every minute: symfony cron job
* * * * * root bash ${SCRIPT_DIR}cron.sh >> ${LOG_PATH}symfony.sh.log 2>&1
## every minute: phpBB cron job
* * * * * root bash ${SCRIPT_DIR}phpbb-cli.sh cron:run >> ${LOG_PATH}phpbb-cli.sh.log 2>&1
## every xx minutes, during day-time: TLI Cache Warmer
*/5 7-23 * * * webstackup cd "${PROJECT_DIR}" && symfony console cache:warmup >> ${LOG_PATH}cache-warmup.log 2>&1
## every xx minutes, during day-time: share on Telegram, WhatsApp, ...
# ⚠ Keep the interval synced with EXEC_INTERVAL from https://github.com/TurboLabIt/TurboLab.it/blob/main/src/Command/ShareOnSocialCommand.php
*/15 8-23 * * * root bash ${SCRIPT_DIR}social-share.sh --cron >> ${LOG_PATH}social-share.sh.log 2>&1
## every hour: dump server configuration for the info page
0 * * * * root bash ${SCRIPT_DIR}server-info-dump.sh >> ${LOG_PATH}server-info-dump.sh.log 2>&1
## mid-night and mid-day: run the cleaner
7 0,12 * * * root bash ${SCRIPT_DIR}cleaner.sh >> ${LOG_PATH}cleaner.sh.log 2>&1
## every night: sitemap generator
0 2 * * * root bash ${SCRIPT_DIR}sitemap-generate.sh >> ${LOG_PATH}sitemap.sh.log 2>&1
## every morning: deploy and import TLI1
0 5 * * * root bash ${SCRIPT_DIR}deploy.sh && bash "${SCRIPT_DIR}tli1-tli2-hybrid-import.sh" > ${LOG_PATH}autodeploy-and-tli1-import.log 2>&1
## every morning: unsubscribe bouncing email addresses
0 11 * * * root bash ${SCRIPT_DIR}email-bounce-manager.sh > ${LOG_PATH}email-bounce-manager.sh.log 2>&1
## every friday: send the weekly newsletter
# For delivery to real users: --real-recipients --send-messages
30 9 * * fri root bash ${SCRIPT_DIR}newsletter-send.sh --real-recipients --send-messages --local-smtp && bash ${SCRIPT_DIR}email-bounce-manager.sh >> ${LOG_PATH}newsletter.log 2>&1
## 👇 If the last entry is missing a newline, cron will consider the file broken and refuse to run it 👇