Problem:
Attempting to re-run cron while it is already running.
Solution
Cronjob (hourly):
1 * * * * ...myscripts/my-drupal-cron.sh
my-drupal-cron.sh
#!/bin/bash
maindir="/var/www/mysite123"
logfile="$maindir/scripts/cron/logs/drush-cron--$(date +%Y-%m-%d-%H%M).log"
echo " START : $(date '+%Y-%m-%d %H:%M:%S') " >> "$logfile" 2>&1
cd $maindir
drush="php -c $maindir/drush.ini $maindir/vendor/drush/drush/drush"
$drush cron >> "$logfile" 2>&1
echo " END : $(date '+%Y-%m-%d %H:%M:%S') " >> "$logfile" 2>&1
Neuen Kommentar schreiben