Click to See Complete Forum and Search --> : a question about cron ???


cotfessi
01-18-2001, 12:31 AM
I'm currently connected to the net via an ADSL line with a dynamic IP address. In order to have a domain name point to my box, I have an account with centralinfo.net and a script that runs that updates my current IP to centralinfo.net When I run the script from the terminal it works. but it doesn't seem to work when I added it to /etc/crontab

I made a directory:
/etc/cron.5minute

that has the following file:
/update.sh

#!/bin/bash
/path/to/script.pl /path/to/config.file

this is what my /etc/crontab lookslike( the last line is the one I entered)

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
* /5 * * * * root run-parts /etc/cron.5minute

Did I set up that line correctly? It just seems different than the other lines(the slash in there)

Gaccm
01-18-2001, 01:14 AM
that slash shouldn't be there, try doing: man 5 crontab. It tells u the layout of the crontab file. Also theres no need to put it in its own directory, just make the file, and put /path/to/script.pl /path/to/config.file in crontab file. (i have adsl, and i made cron update it every night at 2am. You can do the same and then u dont need to run the script everynight, just everytime u connect)

cotfessi
01-18-2001, 01:36 AM
I think I figured out what the heck I did wrong...
*/5 * * * * owner command instead of...
* /5 * * * *