[LRUG] Disrespectful cron

Andrew Stewart boss at airbladesoftware.com
Wed Feb 14 01:31:14 PST 2007


Hi Alex,

On 13 Feb 2007, at 21:18, Alex Pounds wrote:
> On Tue, Feb 13, 2007 at 04:06:01PM +0000, Andrew Stewart wrote:
>> I'm trying to set up cron on a server so that I can clear out old
>> sessions, rotate log files, etc.  I've used cron lots of times before
>> but for some reason can't get it working now.  Is anyone out there
>> good at this sort of thing?
>
> I'm going to ask a couple of questions that might be akin to  
> teaching you
> to suck eggs, but better to ask than not...

Indeed.  Always worth asking.

> 1. How are you editing your crontab? You're doing crontab -e, right?

Yes.

> 2. You look like you've got tabs between your time fields. Have you  
> tried
> with spaces? I don't think it matters, but it might. Use spaces  
> between
> your time fields and a tab between the time and the command:
>
> 45 * * * *      /usr/bin/ls

Good tip.  I'm not sure if it matters either and tried both spaces  
and tabs as well as your combo suggestion.

It turned out to be a lack of memory in the end, so nothing to do  
with my syntax.  Which is a relief on the one hand but could be  
expensive on the other :)

Thanks for your reply,
Andy



More information about the Chat mailing list