Re: little shell script

From: strange(at)nsk(dot)yi(dot)org
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: little shell script
Date: 2002-07-26 13:28:58
Message-ID: 20020726142858.A16331@nsk.yi.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Masaru Sugawara 2002-07-26 13:54:23 Re: Oracle to PGSQL -- need help
Previous Message Elielson Fontanezi 2002-07-26 13:27:58 set DateStyle to 'SQL'