chicken: (Default)
[personal profile] chicken
Hello to any *nix geeks on my friends list.

Does anyone know how to figure out why a cron job isn't running? Is there a log somewhere that acts as STDERR for cron?

Is there something I forgot? That is, all I did was 'crontab -e' and then save it, which I thought was all, but did I need to use '/etc/init.d/cron stop | start' in order for the daemon to read in the new job? That seems unlikely, especially since I don't have 'sudo' or 'root' on the machine in question anyway. If there is no Log for cron's errors, then is there a checking routine I can run to test my syntax? Similar to the way you can run 'apachectl configtest'? I made sure that to set 'u+x' on the '~myHomeDir/bin/executable.bash' file which my cron calls, and made sure the crontab line lists *my* userid as the owner of the process. I cannot think what else to do. Here is the gist of my crontab entry:

30 0 * * * cmah /home/cmah/bin/run-webalizer.bash

Of course I checked and ran the bash script by hand to make sure it works. And I hope that the '30 0 * * *' means that I want to run the cron job every day at 00:30:00 (30 minutes after midnight).

(no subject)

Date: 2004-01-09 07:20 pm (UTC)
From: [identity profile] paulv.livejournal.com
Sometimes the crontab file needs to end in a blank line (both /etc/crontab and the crontab you get to by crontab -e). stderr of the script would be sent to you in email.

Note that if you're not editing /etc/crontab, you can't put the username in there -- if it's your user crontab, it's going to get run as you, and so it would try to run 'cmah' with /home/cmah/bin/run-webalizer.bash as it's argument.

(no subject)

Date: 2004-01-09 07:47 pm (UTC)
From: [identity profile] chicken-cem.livejournal.com
Yes, in emacs I do tend to put a carriage return as the last line, so it cannot be that. But I see that it is the use of my userid there. I will just leave it out. Thank you! I think it didn't send me email because our SysAdmin turned off sendmail for security reasons. Hmmmm.

(no subject)

Date: 2004-01-10 12:53 am (UTC)
From: [identity profile] fabio-heinz.livejournal.com

What you could try is this:

30 0 * * * /home/cmah/bin/run-webalizer.bash >> /home/cmah/webalizer-log 2>&1

This will put the output and the errors into /home/cmah/webalizer-log.

See man 5 crontab for details.


(no subject)

Date: 2004-01-10 05:43 am (UTC)
From: [identity profile] chicken-cem.livejournal.com
Thanks, that should work. Nifty icon.

(no subject)

Date: 2004-01-10 01:12 am (UTC)
From: [identity profile] paulv.livejournal.com
Turning off sendmail for security sounds reasonable to me. Though not replacing it with something else (like postfix) is of questionable reasoning to me. :)

(no subject)

Date: 2004-01-10 03:20 am (UTC)
From: [identity profile] chicken-cem.livejournal.com
No one ever said our sysAdmins were unquestionalbe in their reasoning, believe me. ;-) I like them a lot, because when they took over our sysAdminning, they helped us out a lot and knew a lot more than we did about stuff. And someone higher up even than they decided to "standardize" on Solaris, even though people (even or maybe even especially some of the sysAdmins) said Linux was better. They have a small number of Debian machines, but are not really encouraged to buy more. They just have a really different philosophy of how to work than we do. Our group is very cooperation-oriented, we have all worked together for ten or more years, and we trust each other, whereas their group is really loath to give anyone an inch. We finally got sudo permissions on our sandbox machine (only for three trusted people) -- it *is* a sandbox machine. Not that we don't care about security -- after all, we started using SSH long before the rest of the university.

But one of their paranoid security measures was to shut down mail services; they made us all migrate to their stupid MS Exchange mail server. (urgh).

(no subject)

Date: 2004-01-10 06:56 am (UTC)
From: [identity profile] paulv.livejournal.com
I trust the irony of switching to MS Exchange for security reasons isn't lost on you. :)

It's funny, though, because a few months ago we installed a postfix machine in front of an Exchange server because they didn't want the Windows machine on the internet.

(no subject)

Date: 2004-01-10 07:36 am (UTC)
From: [identity profile] chicken-cem.livejournal.com
I trust the irony of switching to MS Exchange for security reasons isn't lost on you. :)

Well, duh! :-) Hence my mentioning it.

I really do not understand the mindset of these MS fans -- do they not see what is right in front of their faces? And all that crap about how MS products are cheaper, when in fact the amount of money one spends on tech support, bug fixing, security patching, etc. etc. etc. far outweighs the initial cost benefit, if there is one at all.

Profile

chicken: (Default)
chicken

April 2009

S M T W T F S
   1234
56 78 9 1011
12131415161718
192021 22232425
2627282930  

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags