[svlug] Cron not working

Juan Enciso Juan.Enciso at corp.terra.com.pe
Wed Aug 5 07:40:31 PDT 2009


Could you look the /etc/cron.allow and /etc/cron.deny files?
Maybe root is deny for use cron.

Juan Enciso Condeña
Área de Operaciones
-------------------------------------------------------------- 
Terra Networks Perú, S.A.
Calle Los Sauces 374 Piso 4
Of. 403, San Isidro, Lima, Perú
Telf. (511) 411-1260 anexo 1324
Cel. (511) 996371353 
RPM: *299527 
www.terra.com.pe
--------------------------------------------------------------


-----Mensaje original-----
De: Skip Evans [mailto:skip at bigskypenguin.com] 
Enviado el: Miércoles, 05 de Agosto de 2009 09:22 a.m.
Para: Juan Enciso
CC: SVLUG
Asunto: Re: [svlug] Cron not working

Yes, it is running as 'cron'

.... "D'oh!"

Anyway, I put the command in /etc/crontab and I'm sure it will 
run there since there are entries in syslog that show the 
commands there are running, but why it's not running from my 
root's crontab is still something I'm looking into.

I'll put a simple test program there to run every hour as I 
work on it, but the back ups need to run so I'll keep that in 
/etc/crontab for now.

Skip

Juan Enciso wrote:
> Sorry man, but I don't know if it should running by default, I'm not an ubuntu user. 
> 
> If you use ubuntu is probably that daemon is named cron instead crond
> Try using:
> 
>  ps -fea | grep cron
> 
> Juan Enciso Condeña
> Área de Operaciones
> -------------------------------------------------------------- 
> Terra Networks Perú, S.A.
> Calle Los Sauces 374 Piso 4
> Of. 403, San Isidro, Lima, Perú
> Telf. (511) 411-1260 anexo 1324
> Cel. (511) 996371353 
> RPM: *299527 
> www.terra.com.pe
> --------------------------------------------------------------
> 
> 
> -----Mensaje original-----
> De: Skip Evans [mailto:skip at bigskypenguin.com] 
> Enviado el: Miércoles, 05 de Agosto de 2009 08:59 a.m.
> Para: Juan Enciso
> CC: SVLUG
> Asunto: Re: [svlug] Cron not working
> 
> root at quad-core-1:/usr# ps -fea | grep crond
> root      7669  5005  0 08:52 pts/2    00:00:00 grep crond
> root at quad-core-1:/usr#
> 
> Oh, bloody hell! How can it NOT be running? I didn't think a 
> Unix/Linux system could survive without cron.
> 
> This is a new Unbuntu 9.04 install. Wouldn't cron be running 
> by default???
> 
> So I need to start cron and ensure that it starts each morning 
> I fire up this workstation.
> 
> I just tried this, but it failed.
> 
> /etc/init.d/cron start
> 
> So I tried this
> 
> /etc/init.d/cron restart
> 
> And got an [ OK ] back, but doing the PS command still does 
> not show crond running.
> 
> I am logged in as root, by the way.
> 
> As I said before, there is no /usr/lib/cron directory. Do I 
> need to create this and the appropriate entries?
> 
> Is there some kind of install or config that needs to be done 
> for cron for a new Ubuntu 9.04 install?
> 
> 
> Skip
> 
> Juan Enciso wrote:
>> Hi Skip
>>
>> Is running the crond daemon?
>>
>> Show me this command output, please.
>>
>> ps -fea | grep crond
>>
>> Juan Enciso Condeña
>> Área de Operaciones
>> -------------------------------------------------------------- 
>> Terra Networks Perú, S.A.
>> Calle Los Sauces 374 Piso 4
>> Of. 403, San Isidro, Lima, Perú
>> Telf. (511) 411-1260 anexo 1324
>> Cel. (511) 996371353 
>> RPM: *299527 
>> www.terra.com.pe
>> --------------------------------------------------------------
>>
>>
>> -----Mensaje original-----
>> De: svlug-bounces+juan.enciso=corp.terra.com.pe at lists.svlug.org [mailto:svlug-bounces+juan.enciso=corp.terra.com.pe at lists.svlug.org] En nombre de Skip Evans
>> Enviado el: Miércoles, 05 de Agosto de 2009 08:20 a.m.
>> Para: SVLUG
>> Asunto: [svlug] Cron not working
>>
>> Hey all,
>>
>> I created the following cron job with
>>
>> crontab -e
>>
>> as root, but it won't run.
>>
>>
>> # m 	h  	dom 	mon 	dow   	command
>> 1	8	*	*	*	/bin/cp /mnt/BSP_usr/backup/* /usr/backup/
>>
>> However, I can just cut and paste the command from crontab -l 
>> and it runs just fine from the command line, so I know the 
>> back up files are accessible from the server and can be 
>> written to my local drive.
>>
>> I also see on my system there is no /usr/lib/cron directory at 
>> all, but I get the impression from what I've read root can 
>> always run a cron job regardless of what's in /usr/lib/cron, 
>> or even if it does not exist.
>>
>> Any help would be greatly appreciated.
>>
>> I changed permissions on /usr/backup to 777 just to make sure 
>> it was not a permissions issue.
>>
>> I did the following to try to find it in syslog but there is 
>> no reference to it there.
>>
>> grep CRON /var/log/syslog
>>
>> Skip
>>
> 

-- 
====================================
Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com
------------------------------------
Those of you who believe in
telekinesis, raise my hand.
  -- Kurt Vonnegut




More information about the svlug mailing list