You are not logged in.

#1 2010-07-07 14:08:21

Ben9250
Member
From: Bath - England
Registered: 2010-06-10
Posts: 208
Website

Cron query.

Heylo, I've been learning about cron and have been trying to get archup to run every hour in cron so as it will tell me of any updates. I've followed its install instructions, put the .sh script in /etc/cron.hourly and done a chmod -R 755 on it so it should be executable by all. However it does not seem to work every hour as I get no notifications, but if I type archup into the terminal then it does give me notifications. Now I have noticed that A) I do not have a crontab for my user (ben) it seems. But root does, and it does indeed have the two sections, the top one with the crontab format for setting times and then giving a command to run, and then the system bit below which just runs the scripts in cron.hourly, daily etc. when appropriate. So my question is, should I do my own crontab and have a system section to run the contents of those folders in order to get it to work? Or should it work anyway through root's crontab? If this is the case then perhaps I need to change archup's UID (because of what I read from the install page)?:

--uid|-i [value]            Set the uid of the process.
                                      The default is to keep the uid of the user who started archup.
                                      !!You should change this if root is executing archup!!

If you get what I mean, perhaps if it's root's crontab that archup is run from then this needs changing? Or it could be that root's crontab does not work when not logged in as root (although I assumed it always would)?

Last edited by Ben9250 (2010-07-10 11:08:53)


"In England we have come to rely upon a comfortable time-lag of fifty years or a century intervening between the perception that something ought to be done and a serious attempt to do it."
  - H. G. Wells

Offline

#2 2010-07-07 14:51:38

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: Cron query.

Let's start with the obvious -- Is crond running ?  (Check your /etc/rc.conf daemons line and check in /var/run/daemons for a crond entry.
Do other cron jobs run? 
Anything interesting in  /var/log/crond.log?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2010-07-07 14:59:44

Ben9250
Member
From: Bath - England
Registered: 2010-06-10
Posts: 208
Website

Re: Cron query.

Hi, I had a look in crond.log to try and find out if there was an error but there isn't anything there, and rc.conf does have crond in the daemons array. The only other cronjobs I have are the ones already set, to do with the time and such, and as the time is always correct I can only assume it is being aligned/corrected with the internet correctly (at least that's what I figured it does when I looked at it).


"In England we have come to rely upon a comfortable time-lag of fifty years or a century intervening between the perception that something ought to be done and a serious attempt to do it."
  - H. G. Wells

Offline

#4 2010-07-07 16:14:21

Ben9250
Member
From: Bath - England
Registered: 2010-06-10
Posts: 208
Website

Re: Cron query.

Reading the Cron wiki page again I noticed a point, should root be a member of the users group?


"In England we have come to rely upon a comfortable time-lag of fifty years or a century intervening between the perception that something ought to be done and a serious attempt to do it."
  - H. G. Wells

Offline

Board footer

Powered by FluxBB