Results 1 to 5 of 5

Thread: Problem with crontab

  1. #1
    Join Date
    Oct 2008
    Posts
    44

    Problem with crontab

    My problem is this.

    In fact I made a java program. This program has many input parameters.

    I made one .sh to the java program. Then edit the crontab for the program runs each day.

    So far everything works well.

    when I called to my.sh with paraemetres such as accents in my log file I can see it displays correctly, but when it's crontab that uses my.sh with of parameters containing accented characters, my log file displays? In place of these characters. And suddenly the program does not run properly.

    So I feel that my crontab is difficult to interpret characters in UTF-8

    Thank you for giving me some answers if you have an idea of problem.

  2. #2
    Join Date
    Mar 2008
    Posts
    198

    Re: Problem with crontab

    Hello

    at the beginning of your script.sh have you written following:

    Code:
    /bin/sh

    export LANG = en_US.UTF-8

  3. #3
    Join Date
    Oct 2008
    Posts
    44

    Re: Problem with crontab

    thank you for the proposal, but it doesn't help me much since this variable is already filled.

    When I made the CommDir env get
    LANG = en_US.UTF-8
    GNOME_KEYRING_PID = 3517
    KDE_IS_PRELINKED = 1
    GDM_LANG = en_US.UTF-8
    KDEDIRS = /usr

    So it is already done, more info?

  4. #4
    Join Date
    Mar 2008
    Posts
    198

    Re: Problem with crontab

    The crontab command is launched with a pristine environment (with the exception of a few variables like $HOME). So when your script is executed by crontab, LANG is not set, and must be positioned by self.

  5. #5
    Join Date
    Oct 2008
    Posts
    44

    Re: Problem with crontab

    Quote Originally Posted by aftab1 View Post
    The crontab command is launched with a pristine environment (with the exception of a few variables like $HOME). So when your script is executed by crontab, LANG is not set, and must be positioned by self.
    Indeed you were right, now it's functioning correctly by adding export LANG = en_US.UTF-8 in my script.

Similar Threads

  1. Sony VGNCS3 laptop 15 inch screen problem...LCD or CHIP problem?
    By Mick$Tyler in forum Hardware Peripherals
    Replies: 5
    Last Post: 31-10-2010, 06:49 AM
  2. Replies: 4
    Last Post: 10-04-2010, 04:19 PM
  3. Linux Crontab syntax
    By jean-paul martell in forum Operating Systems
    Replies: 3
    Last Post: 13-08-2009, 02:15 PM
  4. What is centos crontab?
    By CentOS-DollarUser in forum Operating Systems
    Replies: 3
    Last Post: 04-08-2009, 10:16 PM
  5. Scripts not running in crontab
    By Frasier in forum Operating Systems
    Replies: 6
    Last Post: 22-10-2008, 01:33 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,245,790.90707 seconds with 17 queries