Re: [opensuse] Re: cron problems



"MH" == Mohamed Haidar <mohedsuse@xxxxxxxxxxx> writes:
MH> Joachim Schrod wrote:

Mohamed,

Please send your responses to the list, and not to me personally. This
way, others with similar problems can look up the discussion in the
list archives. If I know an answer, I will post it there as well. If I
don't know one or if I make errors in my recommendations, somebody
else can step in and point that out.

cron logs via syslog; there should be log records about the start of each
job in /var/log/messages. The exception is when your crontab line starts
with "-" (a hyphen), then job start logging is turned off. (In fact, when
your ipdetect cron job really works, you might want to turn off job start
logging that way.)

If there are no respective log entries, execute "touch /etc/cron.d" to be
on the save side.
cron detects changes in files in cron.d only if the timestamp of the
directory /etc/cron.d changes as well. Alternatively, call "rccron
restart".

After touching cron.d, there must be log entry that cron re-read the
crontab files, maybe one or two minutes later.

Your crontab syntax itself is OK, that's not the cause.

MH> It just refuses to work, I tried the above with no result, and also :
MH> crontab /etc/cron.d/IPdetect

That does not work. The syntax for (1) files in /etc/cron.d/ and (2)
files that are passed to the crontab command is different. (1) has the
userid in it, before the command, (2) has just the command.

MH> Am I missing something here. Could you give me an idiots step by step
MH> guide to how you would go about from scratch.

First thing: Does

grep cron /var/log/messages

output some (or many) lines?

If no, you need to tell us (with an email to the list, not to me ;-).
Then the investigation has to take a completely different path.

If yes, cron is running. Then, does

grep -i 'cron.*ipdetect' /var/log/messages

output anything?


Joachim

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Joachim Schrod Email: jschrod@xxxxxxx
Roedermark, Germany
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx



Relevant Pages

  • Re: Running DBI, ODBC in the crontab
    ... Run the following lines in both the command line and crontab: ... Any of the paths that are missing in cron ... This communication is issued by UBS AG or an affiliate by the ...
    (perl.dbi.users)
  • SUMMARY: cron entry: nth day of every month?
    ... cron can not handle this with its own syntax. ... 21st but "command" only runs if the output of the "date" command ... What I would suggest is rather than embedding the logic in each script ... The answer is it is _not_ possible to control it only with crontab ...
    (Tru64-UNIX-Managers)
  • Re: Cron job question
    ... > From: root@somedomain.nl (Cron Daemon) ... You've made the classic mistake of confusing the system crontab ... extra column defining which user ID the command should be run as. ... any new cron jobs for any user (including root) and leave the system ...
    (freebsd-questions)
  • Re: [SLE] rsync log
    ... If you type kcron you should get the ... What this means is the non-error output from a command like rsync prints ... the standard output of a cron job is emailed ... kcron is just a GIU way to specify your crontab ...
    (SuSE)
  • RE: crond not found
    ... Crontabs does not contain the cron daemon: ... Group: System Environment/Base Source RPM: ... The crontabs package contains root crontab files. ...
    (RedHat)