Re: little shell script - Mailing list pgsql-general

From strange@nsk.yi.org
Subject Re: little shell script
Date
Msg-id 20020726142858.A16331@nsk.yi.org
Whole thread Raw
In response to little shell script  (Elielson Fontanezi <ElielsonF@prodam.sp.gov.br>)
List pgsql-general
Uuuuh! So many To:....

On Thu, Jul 25, 2002 at 03:33:49PM -0300, Elielson Fontanezi wrote:
> Hi folks!
>
>     Who can help me about the simple shell scripts that follows?

Do you want help with the script or installing it in CRON?

Assuming the later:

> [root@pg_server cron.daily]# crontab -u zakal /etc/cron.daily/dump
> "./dump":2: bad minute
/etc/cron.daily/ contains scripts to be run daily, not crontabs.

crontab is used to edit or install a user crontab, which is in the form:
0 * * * * run_script_every_hour.sh
0 */4 * * * run_script_every_four_hours.sh
* 4 * * * run_script_every_day_at_4_o_clock.sh

$ man 5 crontab # has the description of the format and more examples

So you should just leave the script as it is in /etc/cron.daily/ to be run
as root every day, or if you need it to be run as some other user, put the
script in the user's home directory and install a proper line to that
user's crontab.

Regards,
Luciano Rocha

--
Consciousness: that annoying time between naps.

pgsql-general by date:

Previous
From: wsheldah@lexmark.com
Date:
Subject: Re: Evolving databases (eg deleting columns)
Next
From: Masaru Sugawara
Date:
Subject: Re: Oracle to PGSQL -- need help