Skip to content

Instantly share code, notes, and snippets.

@sergeycherepanov
Last active June 20, 2018 07:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sergeycherepanov/6f5070f849b247c0afaca6ac47f20271 to your computer and use it in GitHub Desktop.
Save sergeycherepanov/6f5070f849b247c0afaca6ac47f20271 to your computer and use it in GitHub Desktop.
magento2 crontab здорового человека
*/5 * * * * /usr/bin/flock -w 10 -x /tmp/magento.cron.lock /bin/bash -c "nice -n 19 ionice -c2 -n7 /usr/bin/php7.0 /var/www/current/bin/magento cron:run 2>&1 | awk '{ print strftime(\"[\%Y-\%m-\%d \%H:\%M:\%S]\"), \$0 }' | tee -a /var/www/current/var/log/magento.cron.log; echo 'Complete' | awk '{ print strftime(\"[\%Y-\%m-\%d \%H:\%M:\%S]\"), \$0 }' | tee -a /var/www/current/var/log/magento.cron.log"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment