cron job not running
- From: "Helmut Schneider" <jumper99@xxxxxx>
- Date: Tue, 29 May 2012 16:06:47 +0000 (UTC)
Hi,
if I put this into /etc/crontab:
* * * * * root aptitude -syV
safe-upgrade | grep -E '^\s+.*$'"
nothing happens. If I run the same command from dash:
~$ aptitude -syV safe-upgrade | grep -E '^\s+.*$'
libsnmp-base [5.4.2.1~dfsg0ubuntu1-0ubuntu2.1 ->
5.4.2.1~dfsg0ubuntu1-0ubuntu2.2]
libsnmp15 [5.4.2.1~dfsg0ubuntu1-0ubuntu2.1 ->
5.4.2.1~dfsg0ubuntu1-0ubuntu2.2]
libssl0.9.8 [0.9.8k-7ubuntu8.11 -> 0.9.8k-7ubuntu8.13]
libxml2 [2.7.6.dfsg-1ubuntu1.4 -> 2.7.6.dfsg-1ubuntu1.5]
openssl [0.9.8k-7ubuntu8.11 -> 0.9.8k-7ubuntu8.13]
snmp [5.4.2.1~dfsg0ubuntu1-0ubuntu2.1 ->
5.4.2.1~dfsg0ubuntu1-0ubuntu2.2]
snmpd [5.4.2.1~dfsg0ubuntu1-0ubuntu2.1 ->
5.4.2.1~dfsg0ubuntu1-0ubuntu2.2]
~$
Even if I put those line into a shell-script (dash) it does not give
any output.
According to cron.log the job should have run:
May 29 17:36:01 desoggw05 CRON[22700]: pam_unix(cron:session): session
opened for user root by (uid=0)
May 29 17:36:01 desoggw05 CRON[22701]: (root) CMD (aptitude -syV
safe-upgrade | grep -E '^\s+.*$')
May 29 17:36:02 desoggw05 CRON[22700]: pam_unix(cron:session): session
closed for user root
If I change the REGEX to '^ +.*$' the script runs fine.
Why?
Tested on 10.04 und 12.04.
Thanks, Helmut
--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
- Follow-Ups:
- Re: cron job not running
- From: Patrick Asselman
- Re: cron job not running
- Prev by Date: Re: What is the proper bandwidth settings for ubuntu one
- Next by Date: Re: How do I disable screen blanking?
- Previous by thread: ecryptfs and storebackup
- Next by thread: Re: cron job not running
- Index(es):
Relevant Pages
|