-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Joachim Schrod wrote:
> G T Smith wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Mohamed Haidar wrote:
>>> Hello guys, I have a problem with cron. I got a program for updating my
>>> ip to a internet dns host and i set it up correctly. The program  works.
>>> Now with the program came a file  that i putt in the /etc/cron.d dir
>>> because the program instructed me to do that. Basically  what I want to
>>> do is to let the program run once a minute. The file I putt in the
>>> cron.d dir contains these entries :
>>>
>>>  * *       * * *   root    /usr/bin/ipdetect.sh
>>>  */15 *  * * *   root    /usr/bin/ipdetect.sh -p host -r browser -c
>>
>> The above lines should be either be added to the /etc/crontab file.
> 
> Please be careful: Mohamed's approach of creating a file with that
> content in /etc/cron.d/ is perfectly valid, and this is also the right
> syntax for these files (with the user). Therefore, it *should* work, and
> we need more information to debug his problem.
> 
> Cron reads more than /etc/crontab and the personal crontab files, it
> also reads /etc/cron.d/*, as explained in the 2nd paragraph of man cron.
> 
>     Joachim
> 

I double checked the man pages. I remember at one time there was a
difference between the syntax for various types of crontab files, but
this seems to have changed and this no longer seem to be the case if the
5 crontab man page is to be believed. /etc/cron.d seems to be rarely
used by anything in SuSE , and seems to be a bit of an anomaly as its
effective role is covered by /etc/crontab and the /etc/cron.<time>
directories. I presume it is still there for standards related reasons.

There also seems to a lack of clarity in the documentation  about the
default shell used, one part suggests that cron automatically selects
/bin/sh but another that it is obtained from the user account
settings... if the former is the case then the SHELL=/bin/sh statement
in /etc/crontab is redundant unless this is what the statement means
(the question then is do the entries in cron.d inherit the /etc/crontab
settings?). If shell settings are inherited from the user account there
should be no harm in adding the statement, just in case.

BTW the man pages for crontab seem be for 4.1 but the version in use
seems to report itself as V5.0.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFGQhKgasN0sSnLmgIRAg2MAJ43XoJ9DPKgp/5cIIj1T/9JFu8mpACg2o3A
u96Kpk8nVIy5joWfHSAHVG4=
=W6SB
-----END PGP SIGNATURE-----
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to