Solved

My korn shell script does not work using the windows scheduler

Posted on 2004-08-13
12
484 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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
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

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

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

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
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…
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.

691 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