File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,30 @@ tasks:
58
58
cmds :
59
59
- docker compose --env-file .env -f compose.yml stop
60
60
61
+ cron :
62
+ desc : Manually run all necessary cron jobs, and get automation suggestions
63
+ cmds :
64
+ - |
65
+ DOMAIN=$(grep ^DOMAIN= .env | cut -d '=' -f 2)
66
+ echo "Executing check_notifications..."
67
+ curl http://$DOMAIN:8080/jobs/check_notifications -f
68
+ echo ""
69
+ echo "Executing clean_up_database..."
70
+ curl http://$DOMAIN:8080/jobs/clean_up_database -f
71
+ echo ""
72
+ echo "===================================================="
73
+ echo "Automate job execution by adding the lines below to your crontab (crontab -e):"
74
+ echo "===================================================="
75
+ echo ""
76
+ echo "# Run check_notifications every 10 minutes"
77
+ echo "*/10 * * * * curl http://$DOMAIN:8080/jobs/check_notifications -f"
78
+ echo ""
79
+ echo "# Run clean_up_database once a week (Sunday at midnight)"
80
+ echo "0 0 * * 0 curl http://$DOMAIN:8080/jobs/clean_up_database -f"
81
+ echo ""
82
+ echo "===================================================="
83
+
84
+
61
85
_show_upgrade_notes :
62
86
cmds :
63
87
- |
You can’t perform that action at this time.
0 commit comments