I have created a script drup.sh to update the site with security issues and placed it in the sites/default dir.
#!/bin/bash
drush up drupal --security-only -y
And on testing it by running bash drup.sh from the command line, as the user, in the sites/default dir. all works good
When I set up a cron to run it, as the user, I get the following errors
Command pm-update needs a higher bootstrap level to run - you will [error]
need to invoke drush from a more functional Drupal environment to run
this command.
Command pm-update needs the following modules installed/enabled to [error]
run: update.
The drush command 'up' could not be executed. [error]
A Drupal installation directory could not be found [error]
The command I use at the moment is
bash /home/user/public_html/sites/default/drup.sh
I have looked at the page you suggested, I had looked at it before but it did not make sense to me. I have tried various combinations, without success
The closest I can get to it not giving an error is
/usr/bin/env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin COLUMNS=72 --username=/home/username/public_html/sites/default/drup.sh
the output is
SHELL=/bin/sh
USER=middlesex
LD_LIBRARY_PATH=
REMOTE_ADDR_PROTOCOL=4
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
SERVER_REALROOT=/usr/libexec/webmin
PWD=/usr/libexec/webmin/cron/
PERLLIB=/usr/libexec/webmin
REMOTE_ADDR=x.x.x.x
SHLVL=1
HOME=/home/username
LOGNAME=username
_=/usr/bin/env
COLUMNS=72
--username=/home/username/public_html/sites/default/drup.sh
But drush does not run or do anything