In bedrock ansible installation, the --path flag doesn’t seem to be working for migratedb cli command:
web@server$ /usr/bin/wp migratedb profile 5 --path=/srv/www/example.com/current
Warning: No WordPress install found. If the command 'migratedb profile 5' is in a plugin or theme, pass --path=`path/to/wordpress`.
Error: 'migratedb' is not a registered wp command. See 'wp help' for available commands.
$ which wp
/usr/bin/wp
It works fine if run from /srv/www/example.com/current directory without path flag.
Where 6 is the id shown in the query string as the wpmdb-profile ID. I don’t believe this needs to be run by the web user, but it probably makes sense to run as web. On my trellis-provisioned and deployed server the cron.d files are owned by root.
I also discovered the at command today which seems great for single scheduled processes:
echo "echo 'It has been a minute' | mail -s 'Greetings from Echo via At' mike@mzoo.org" | at now + 1 min
Or in the case of migratedb:
echo "/usr/bin/wp migratedb profile 6 --path=/srv/www/example.com/current/web/wp" | at now + 30 min
Not all Linux installs include at, but this Ubuntu 16 does.