I’ve set up a migration between 2 Drupal sites hosted on the same server (Drupal 8 -> Drupal 9). I’m using migration support recently added to drush to run these commands. I’ve created a helper bash script, which contains:
#!/bin/bash
sites=(<mysite>)
for site in "${sites(@)}"; do
drush -r /var/www/drupal -l $site mim <migration_id> --update --execute-dependencies >> /home/<myuser>/migration.log
done
This works fine, when I execute this script manually. However, it doesn’t work (content isn’t migrated), when it’s executed by cron, defined like this:
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/<myuser>/<myscript>.sh >> /home/<myuser>/migration.log
There’s no output in the log and no errors in /var/log/syslog
, where can I only see output like this every 5 minutes:
Feb 16 15:35:01 <hostname> CRON(22314): (<myuser>) CMD (/home/<myuser>/<myscript>.sh >> /home/<myuser>/migration.log)
What can I do to debug this issue and resolve it?