0

I have the problem, that I am trying to automate some Informix database job via the crontab.
The job runs fine when done via the command line or processed via the at queue, but not via the crontab. The informix error "-23191 Unable to load locale categories" might indicate that the locale is not set.
How do I set the locale for cron jobs?

weismat
  • 343
  • 3
  • 16

2 Answers2

1

The infomix locale need to be set in crontab

INFORMIXDIR=/home/informix
CLIENT_LOCALE=es_es.8859-1
DB_LOCALE=es_es.8859-1

0 15 * * *   /home/user/my-script.sh

The locale es_es.8859-1 is in my case, you need to check what is your locale.

0

The locale is usually inferred by the LANG and LC_* environment variables, so try setting these in the crontab itself. For example:

LANG=C
LC_ALL=C

0 * * * *   nobody  my-script.sh
mgorven
  • 30,615
  • 7
  • 79
  • 122