MKS Korn shell not working when schedule


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting MKS Korn shell not working when schedule
# 1  
Old 12-22-2010
MKS Korn shell not working when schedule

Hi
I have a sample MKS Korn Shell script, it is working fine when I am executing manually (i.e command prompt) but not when schedule through scheduler.

here is the script, ls command working just fine manual run, so I thought it could be environment varilable so kept same PATH when running manually even that is not helping. Any thoughts are appreciatable

Code:
###########################
#!/bin/ksh   

export PATH="C:\PROGRA~1\MKSTOO~1\bin;C:\PROGRA~1\MKSTOO~1\bin\X11;C:\PROGRA~1\MKSTOO~1\mksnt;D:\oracle\product\10.2.0\db_1\bin;C:\Program Files\Legato\nsr\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\MicroStrategy;C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322;D:\Microstrategy\Administrator\Command Manager;D:\Microstrategy\Administrator\enterprise Manager;D:\Microstrategy\Desktop;C:\PROGRA~1\MKSTOO~1\bin;C:\PROGRA~1\MKSTOO~1\bin\X11;C:\PROGRA~1\MKSTOO~1\mksnt;D:\oracle\product\10.2.0\db_1\bin;C:\Program Files\Legato\nsr\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\MicroStrategy;C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322;"
 
ls -ltr //Ecapp1/DevShare/chargebacks 
 
echo "----------------------------------------------------------"
exit
##########################


Last edited by radoulov; 12-22-2010 at 11:17 AM.. Reason: Code tags, please!
# 2  
Old 12-22-2010
#! must be the first 2 bytes: https://www.unix.com/man-page/All/2/exec/
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

While within while is not working in Korn shell

Hi all, I tried to execute a while within another while, but not working. Any suggestions? Thanks in advance #!/bin/ksh typeset -i i=1 typeset -i j=1 while ] do while ] do print i = $i j= $j (( j=j+1 )) done (( i=i+1)) done (3 Replies)
Discussion started by: Soham
3 Replies

2. Shell Programming and Scripting

Typeset is not working in Linux korn shell scripting

Hi All, Kindly help on the below issue ASAP. Its very urgent. I have script in which we have below two lines for code and it is not working. Please help. files_to_process=" abc_*.log def_*.log ghi_*.log " typeset -A dir_list ${files_to_process} the script is failing in Linux... (3 Replies)
Discussion started by: tvbhkishore
3 Replies

3. Shell Programming and Scripting

Want to Schedule Shell Script on AIX

Hi All, I want to schedule a shell script on AIX. But Crontab is not working in my AIX Server.Is there any alternative? Please Suggest.. (2 Replies)
Discussion started by: bharat1211
2 Replies

4. Shell Programming and Scripting

Shell script to schedule jobs

Dear all, I have to create a shell script which will run the job during weekday/weekend in following manner: - There are 3 jobs JB_1 JB_2 JB_3 These jobs changes its flag to "COMPLETED" in below 2 ways 1. These 3 jobs which runs after the completion of previous one i.e JB_1 runs and... (5 Replies)
Discussion started by: prajaktaraut
5 Replies

5. Linux

how to access schedule in cron/mks/w'

Hi, I need to work around 20 boxes to compile list of scheduled jobs on all of them, and these could be set in Linux RHat:cron, or Windows:MKS scheduler, or Windows:scheduler. Do you know how I can access those entries from script to have this whole list in sync, as we have it changed... (0 Replies)
Discussion started by: trento17
0 Replies

6. Windows & DOS: Issues & Discussions

Porting Unix c-shell script to Window under MKS-Tookit

Please ignore this question. (0 Replies)
Discussion started by: Sommerville
0 Replies

7. Shell Programming and Scripting

MKS KORN SHELL WONT EXECUTE from windows command prompt

Can anybody help me with this small script , the script works fine and launches the IE from c:\documents and settings \test\my documents>ksh prompt $RunURL1.sh this scitpt works and launches the ie from ksh , but when i schedule it to run the script then i get the error box saying command:1... (2 Replies)
Discussion started by: venu
2 Replies

8. Shell Programming and Scripting

How to schedule a job in shell scripting.

Hi all I have made a shell script to check jobs' status and send an alert based on the result. I want to run this script to run every 4 hours and I don't have access to cron. Can we schedule using shell scripting instead of cron facility? (2 Replies)
Discussion started by: johnl
2 Replies

9. Shell Programming and Scripting

putting ftp in korn function - no longer working

This works if it's not in a function. I pulled it into one and I get syntax error, no mathcing '<'. I have to call it several times and need it to be a function. Any ideas? function FTP_Engine_File { ftp -inv ${FTP_SERVER} << EOF_FTP >> ${FTP_LOG} user ${FTP_USER} ${FTP_PSWD} ... (4 Replies)
Discussion started by: brdholman
4 Replies

10. UNIX for Dummies Questions & Answers

korn shell to bash - statement not working

Everything else seems to be working, but this isn't. Is it the "cat..." that is wrong of the condition? Thanks. cat tc_result.txt | while read LINE do if then let "files_run += 1"; echo "inside the if loop" # save current filetype case $LINE... (5 Replies)
Discussion started by: brdholman
5 Replies
Login or Register to Ask a Question