I've installed a fresh Ubuntu 16.04 to replace my Windows OS.
I'm trying to setup cronjobs to run mangento 2.1 via Ampps softaculous. The software has been successfully installed (both ampps and magento) and it's running well.
I'm trying to setup a crontab but it seems there is an error on the first line second 25.
This is what I'm trying to add in to the crontab for the Ampps user, using the command sudo crontab -e -u ampps
* * * * * /usr/local/ampps/php-5.6/etc
/usr/local/ampps/www/localshop.dev/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /usr/local/ampps/www/localshop.dev/var/log/magento.cron.log
* * * * * /usr/local/ampps/php-5.6/etc
/usr/local/ampps/www/localshop.dev/update/cron.php >> /usr/local/ampps/www/localshop.dev.dev/var/log/update.cron.log
* * * * * /usr/local/ampps/php-5.6/etc
/usr/local/ampps/www/localshop.dev.dev/bin/magento setup:cron:run >> /usr/local/ampps/www/localshop.dev.dev/var/log/setup.cron.log
What am I doing wrong?
I followed an error message in magento 2.1 admin that referred to this troubleshoot link for the version 2.0
and to this configuration guide
Best Answer
Each crontab line must start with a time at which the command should be run and then the command. The general format is:
So, to run
command
at 10:15 every Sunday, you'd do:I'm not sure what your commands are, but you have lines that don't start with a time definition. I don't understand what lines like this are:
That's a time but no command. You're giving it a directory. And lines like this have commands but no time:
So, make sure you follow the format and you should be fine. If this is not clear, edit your question and explain what commands you are trying to run.