{{tag>drupal cms}}

====== cron + drush ======

<code>
set HOME=/var/www/nginx-sites/your-site.com/httpdocs && php /usr/share/php/drush/drush.php importkit-update
</code>

Где в переменную HOME необходимо поместить прямой путь до вашего сайта 

Окончательный вариант записи в crontab выглядит:
**nano /etc/crontab**
<code>
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h d m w user        command

*/30 *    * * *   www-data    set HOME=/var/www/nginx-sites/your-site.com/httpdocs && php /usr/share/php/drush/drush.php importkit-update
</code>

Запуск будет производиться каждые 30 минут, и скрипт будет запускаться от пользователя www-data