?
Solved

My korn shell script does not work using the windows scheduler

Posted on 2004-08-13
12
Medium Priority
?
486 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

770 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