I'm no expert either...!
To run at a specific time, I think you need to use a specific crontab. Then that begs the question if your script needs to run as root or not.
If you need root privilege, then either use sudo (this is a command available under FC/RedHat that allows you to gain su privilege while executing a command), or su to root and then run crontab (crontab allows you to set up a 'list of jobs' that are to be run on specific days at specific times).
Then edit the crontab and put in the 'pattern' that says when you want to run your job. If the script you quote is sometimes run without the UTF setting, then you'll either need to add the entry into the crontab, or create a wrapper script for your script that sets and exports UTF then run your script.
So, putting that in stages:
1) If you script needs root privilege to run do one of:
a) sudo crontab -e
b2) crontab -e
That starts you editting the root crontab.
2) If your script does not need root privilege, then you can edit
your own crontab by simply doing:
a) crontab -e
So 1 above edits the root crontab, and 2 edits your crontab (the crontab file will be named based on your log in id). In either case the crontab file will exist in the 'crontabs' directory (under FC4 that is /var/spool/cron). Its a bit confusing but crontab is the command that is used to edit a crontab file. A crontab file is named after the users login (or su account) and is located in a specific directory (look at the man pages for crontab/cron - or look at this link http://www.unixgeeks.org/security/ne...ix/cron-1.html
A point to note here is that crontab -e kicks of vi as the editor, so you have to save the edit as you would in vi (I tend to use ZZ). You will get a message then saying that the crontab has been updated. You can also abort the edit (:q!) without then affecting the crontab file.
OK, so now you can edit a crontab - now what do you want to put in it?
If you can add the export of the LANG setting to your myproc.sh script (ie your script always runs with LANG set to UTF-8) then simply edit that script and add in the LANG setting. Then add a line to the crontab (via crontab -e) along the lines of:
00 11 * * * /app/myproc.sh
That will run /app/myproc.sh at 11am every day (see the cron/crontab man page for the various time settings). If however, you only want the UTF setting for the 11AM run, then create another script that does:
Save that as say, /app/myprocUTF.sh, than put that in the crontab via crontab -e, so you have:
00 11 * * * /app/myprocUTF.sh
Finally, if all the jobs that you want to run via cron (crontab) need UTF set then you can edit the respective crontab file (crontab -e) and add the following:
# -- Make sure the lang is set for all crontab jobs .............
00 11 * * * /app/myproc.sh
That then automatically sets LANG before running any of the jobs.