fixed crontab every 5 seconds AND skipping empty messages

This commit is contained in:
2026-01-07 17:17:51 +05:00
parent 7342cb7a0b
commit fe9e5f7256
3 changed files with 15 additions and 1 deletions

View File

@@ -1 +1 @@
*/10 * * * * php /var/www/campanula/garden/campanula/system/public/telegram_week.php
* * * * * /var/www/campanula/examples/crontab/week.sh

11
examples/crontab/week.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
# Loop 6 times (60 seconds / 10 seconds = 6 iterations)
for i in {1..6}; do
php /var/www/campanula/garden/campanula/system/public/telegram_week.php
# Wait 10 seconds before next iteration (skip sleep after the last run)
if [ $i -lt 6 ]; then
sleep 5
fi
done