Skip to content
This repository was archived by the owner on Feb 13, 2023. It is now read-only.
This repository was archived by the owner on Feb 13, 2023. It is now read-only.

Drush error when using the default crontab command in config.yml #1027

@kimkennof

Description

@kimkennof

Issue Type

  • Bug Report / Support Request

Your Environment

Vagrant 1.8.6
VirtualBox 4.3.26r98988
ansible 2.1.1.0
  config file =
  configured module search path = Default w/o overrides

Provisioning box: Ubuntu 14.04

Your OS

  • macOS (10.10.5 (14F2009) (yosemite))

Full console output

You have new mail in /var/mail/vagrant
vagrant@ao:/var/www/site/docroot$ cat /var/mail/vagrant
From vagrant@ao.dev Wed Nov 30 11:30:01 2016
Return-Path: vagrant@ao.dev
X-Original-To: vagrant
Delivered-To: vagrant@ao.dev
Received: by ao.dev (Postfix, from userid 900)
id B39EF24199A; Wed, 30 Nov 2016 11:30:01 +0000 (UTC)
From: root@ao.dev (Cron Daemon)
To: vagrant@ao.dev
Subject: Cron vagrant@ao drush -r /var/www/site/docroot elysia-cron run
Content-Type: text/plain; charset=ANSI_X3.4-1968
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/home/vagrant>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=vagrant>
Message-Id: 20161130113001.B39EF24199A@ao.dev
Date: Wed, 30 Nov 2016 11:30:01 +0000 (UTC)

/bin/sh: 1: drush: not found

Summary

When setting up the Drupal cronjob which is commented in the default config.yml file, you constantly get the message: You have new mail in /var/mail/vagrant

When looking at the entries in the file, you can see the Drush binary is not found from the crontab shell. We currently use the following in our production crontabs to provide the necessary environment variables to run Drush correctly:

/usr/bin/env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games COLUMNS=80 drush <your command>

Can someone else confirm this problem, or is it just me?

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions