Solved

My korn shell script does not work using the windows scheduler

Posted on 2004-08-13
12
481 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
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 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.
Suggested Courses

738 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