Solved

My korn shell script does not work using the windows scheduler

Posted on 2004-08-13
12
478 Views
Last Modified: 2013-12-27
I can run my .ksh script manually using uwin login.exe. But when I try to run the script using the windows scheduler it
does not run.
0
Comment
Question by:tmurray22
  • 4
  • 4
  • 2
  • +1
12 Comments
 
LVL 11

Expert Comment

by:griessh
ID: 11795385
Hi tmurray22,

What is the error.
If the scheduler doesn't find the script, specify the whole path to the script. Also make sure it has all the access rights it needs.
If the script itself fails, check if it has the right environment.

======
Werner
0
 

Author Comment

by:tmurray22
ID: 11797001
The scheduler finds the script just fine, the error is "could not run". The access should be oky because I can run the script
fine if I open a Korn Shell sesson and type the file name in. If I associate the .ksh with the login.exe (this is the exe that opens the korn shell) then I get a dos window asking for a password ????

confused?  I am
0
 
LVL 11

Expert Comment

by:griessh
ID: 11799876
Now I am confused, too.
You are running a korn shell script ... on a UNIX system, I assume
You are loging in to that system from a Windows PC. How do you manually login (username/password)?
Could you please show me what you do?
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 20

Expert Comment

by:Gns
ID: 11809184
This isn't unix/linux, and it certainly isn't about X (as far as I can tell:-)...
Are we talking Cygwin here?

-- Glenn
0
 

Author Comment

by:tmurray22
ID: 11810279
No this isn't unix or linux or cygwin it is Uwin on windows. The application has a login .exe that opens a korn shell session in windows(the script was written for korn shell and I don't want to rewrite it).

I then type test.ksh (assuming i am at the proper directory) and this runs a script that deletes some files. In order to schedule
the test.ksh to run I encounter the problem of first opening the korn shell(login.exe) If I schedule the login.exe first the test.ksh
does not know to run in this session. If  I associate test.ksh with login.exe(properties/open with) then I get what looks like a dos window asking for a password. I type in all sorts of possible passwords(network, local ect. ) but is says login inccorrect.

0
 
LVL 20

Expert Comment

by:Gns
ID: 11810820
Oh, sorry... missed the "u" in the initial question:).

This still has nothing to do with the X window system, but...

From your description you don't have the "I'm missing environment settings" I first thought this would be...
It's years since last I even sniffed on U/Win, so ... If I understand you correctly you are trying to run a specific script as a specific user... The traditional UNIX login command is not the right tool for this (it takes no arguments to speak of, and unconditionally login as another (interactive) user). The correct command would be the su command (Substitute User), perhaps with the -c "command to run" option.

-- Glenn
0
 

Author Comment

by:tmurray22
ID: 11825727
Is there any way to add an argument to the scheduler line to run the script (.ksh)
after the login.exe has opened ? This is the line "C:\Program Files\UWIN3.1\usr\bin\login.exe"
0
 
LVL 20

Expert Comment

by:Gns
ID: 11828577
Hm, dgging a bit shows there's no su command. Bummer. And virtually no useadble info on the login.exe command. Double-Bummer.

Found this about cron though: http://www.wipro.com/uwin/KBinfo/at-cron.html
Perhaps something you could use?

-- Glenn
0
 

Author Comment

by:tmurray22
ID: 12549053
The answer to this question was two-fold it was a permissions issue. The at folder has to be changed from system owner to group owner permissions. and the username and password in the Ksh screen need to be submitted on the same line (ETC UCS username password)


tmurray22
0
 
LVL 20

Expert Comment

by:Gns
ID: 12553553
Thanks tmurray22 for that!

-- Glenn
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 12577737
PAQed with points refunded (250)

modulo
Community Support Moderator
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question