De CronHowto :
Dependendo dos comandos que estão sendo executados,
você pode precisar expandir os usuários root
Variável PATH, colocando o seguinte
linha na parte superior do arquivo crontab:
CAMINHO = / usr / sbin: / usr / bin: / sbin: / bin
Mas na verdade, tudo parece estar bem fazendo o mesmo que você .... De onde você tirou esses erros?
CRONTAB:
root@PORTATIL:/var/log$ crontab -l
* * */2 * * /usr/share/myupdate.sh > /var/log/myupdate.log
SCRIPT:
root@PORTATIL:/etc# cat /usr/share/myupdate.sh
#!/bin/bash
#Testing updates
apt-get update -y
apt-get upgrade -y
LOG:
root@PORTATIL:/etc# cat /var/log/myupdate.log
Hit http://security.ubuntu.com lucid-security Release.gpg
Hit http://archive.canonical.com lucid Release.gpg
Hit http://archive.canonical.com lucid Release.gpg
Hit http://packages.medibuntu.org lucid Release.gpg
Get:1 http://dl.google.com stable Release.gpg [197B]
Hit http://ppa.launchpad.net lucid Release.gpg
Hit http://ppa.launchpad.net lucid Release.gpg
Hit http://ppa.launchpad.net lucid Release.gpg
Hit http://security.ubuntu.com lucid-security Release
Hit http://badgerports.org lucid Release.gpg
Hit http://archive.canonical.com lucid Release
Hit http://ppa.launchpad.net lucid Release.gpg
Hit http://ppa.launchpad.net maverick Release.gpg
Hit http://ppa.launchpad.net lucid Release.gpg
Hit http://ppa.launchpad.net lucid Release.gpg
Hit http://ppa.launchpad.net lucid Release.gpg
Get:2 http://dl.google.com stable Release [1347B]
Hit http://security.ubuntu.com lucid-security/main Packages
Hit http://ppa.launchpad.net lucid Release
Hit http://ppa.launchpad.net lucid Release
Hit http://packages.medibuntu.org lucid Release
Hit http://download.virtualbox.org lucid Release.gpg
Hit http://archive.canonical.com lucid Release
Hit http://linux.dropbox.com lucid Release.gpg
Get:3 http://dl.google.com stable/main Packages [1110B]
Hit http://security.ubuntu.com lucid-security/restricted Packages
Hit http://security.ubuntu.com lucid-security/main Sources
Hit http://security.ubuntu.com lucid-security/restricted Sources
Hit http://security.ubuntu.com lucid-security/universe Packages
Hit http://security.ubuntu.com lucid-security/universe Sources
Hit http://ppa.launchpad.net lucid Release
Hit http://ppa.launchpad.net lucid Release
Hit http://ppa.launchpad.net maverick Release
Hit http://ppa.launchpad.net lucid Release
Hit http://ppa.launchpad.net lucid Release
Hit http://badgerports.org lucid Release
Hit http://archive.canonical.com lucid/partner Packages
Hit http://security.ubuntu.com lucid-security/multiverse Packages
Hit http://security.ubuntu.com lucid-security/multiverse Sources
Hit http://ppa.launchpad.net lucid Release
Hit http://packages.medibuntu.org lucid/free Packages
Hit http://download.virtualbox.org lucid Release
Hit http://es.archive.ubuntu.com lucid Release.gpg
Hit http://linux.dropbox.com lucid Release
Hit http://archive.canonical.com lucid/partner Packages
Hit http://ppa.launchpad.net lucid/main Packages
Hit http://ppa.launchpad.net lucid/main Packages
Hit http://es.archive.ubuntu.com lucid-updates Release.gpg
Hit http://badgerports.org lucid/main Packages
Hit http://ppa.launchpad.net lucid/main Packages
Hit http://ppa.launchpad.net lucid/main Packages
Hit http://ppa.launchpad.net maverick/main Packages
Hit http://ppa.launchpad.net lucid/main Packages
Hit http://ppa.launchpad.net lucid/main Packages
Hit http://packages.medibuntu.org lucid/non-free Packages
Hit http://linux.dropbox.com lucid/main Packages
Hit http://es.archive.ubuntu.com lucid Release
Hit http://download.virtualbox.org lucid/contrib Packages
Hit http://ppa.launchpad.net lucid/main Packages
Hit http://es.archive.ubuntu.com lucid-updates Release
Hit http://es.archive.ubuntu.com lucid/main Packages
Hit http://es.archive.ubuntu.com lucid/restricted Packages
Hit http://es.archive.ubuntu.com lucid/main Sources
Hit http://es.archive.ubuntu.com lucid/restricted Sources
Hit http://es.archive.ubuntu.com lucid/universe Packages
Hit http://es.archive.ubuntu.com lucid/universe Sources
Hit http://es.archive.ubuntu.com lucid/multiverse Packages
Hit http://es.archive.ubuntu.com lucid/multiverse Sources
Hit http://es.archive.ubuntu.com lucid-updates/main Packages
Hit http://es.archive.ubuntu.com lucid-updates/restricted Packages
Hit http://es.archive.ubuntu.com lucid-updates/main Sources
Hit http://es.archive.ubuntu.com lucid-updates/restricted Sources
Hit http://es.archive.ubuntu.com lucid-updates/universe Packages
Hit http://es.archive.ubuntu.com lucid-updates/universe Sources
Hit http://es.archive.ubuntu.com lucid-updates/multiverse Packages
Hit http://es.archive.ubuntu.com lucid-updates/multiverse Sources
Fetched 2654B in 1s (1628B/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.