From: | Sigrid Meneses <sigridmeneses(at)gmail(dot)com> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | QUERY A PSQL DB USING CRONTAB |
Date: | 2005-09-21 11:20:37 |
Message-ID: | b629750705092104205f8ec41e@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Hi to everyone i hope you can help me
Im doing a query in a database, but i want to use crontab to do it each
monday
There isn´t no problem when i run my script manually
]$ ./mdnimsi.sh
It generates to me a file
-rw-rw-r-- 1 swuser swuser 4446511 Sep 21 06:14 pttsubs20050921.txt--
but when i add mi script to the crontab, it genrates a file with 0 Kb , i
dont know why can you help me?
FECH=`/bin/date +%Y%m%d`
#Se hace la busqueda en la base de datos
cd /home/swuser/MDNIMSI
psql oampwms_4_1_0_0 -c "select
whlr_subscriber_profile.subscriber_id,whlr_mdn.m
dn from whlr_subscriber_profile,whlr_mdn where whlr_mdn.id =
whlr_subscriber_pro
file.mdn;" > pttsubs$FECH.txt
in crontab
10 * * * * /home/swuser/MDNIMSI/mdnimsi.sh
the output with crontab is
-rw-rw-r-- 1 swuser swuser 0 Sep 16 00:30 pttsubs050916.txt
~
Sigrid Yahaira Meneses Nielsen
tel cel 044 11 09 94 63
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Elphick | 2005-09-21 13:18:31 | Re: QUERY A PSQL DB USING CRONTAB |
Previous Message | Andrej Ricnik-Bay | 2005-09-20 19:58:00 | Re: Starting PGSQL |