Re: Informix Cron Job
Posted in 1998
norli wrote:
>
> Hi all,
>
> Is there a way I can schedule some processes:
>
> 1. update table, on UNIX, via cron job?
>
> I created a cron under user informix to update a table monthly. My cron
> entry:
>
> 1 0 1 * * /export/home/intranet/leave_app/annual_update >/dev/null 2>&1
>
> My annual_update file:
>
> #!/bin/csh
>
> cd /export/home/users/norli/leave_app
>
> dbaccess intranet annual_update.sql
>
> My annual_update.sql file:
>
> #!/bin/csh
>
> update employee set annual=annual+1>
> If I run annual_update from the command prompt, it works. But not from
> the cron job call. Any idea why? Really need some help... Thanks!
>
> - norli -
Agreeing with the other contributors: this cron need for explicit
environment setting is a good reason for isolating all Informix
environment-setting commands in a script file and running it from
logins, cron scripts, etc with . filename. You then have one point of
maintenance.
--
Peter Lancashire
Information Systems Specialist, Bayer plc
Eastern Way, Bury St Edmunds, Suffolk, IP32 7AH, UK
Tel: +44-1635-562258, Fax: +44-1635-562281
Mail: Peter.Lancashire.PL1@bayer.co.uk
---
My Internet plumbing does not allow me to mail and post news together.
Sorry.
All opinions are my own and not those of Bayer plc.
---
Join Infuse, the UK Informix User Group at http://www.infuse.org.uk/