Running shell scripts automatically without using Batch or at commands


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Running shell scripts automatically without using Batch or at commands
# 1  
Old 09-17-2006
Running shell scripts automatically without using Batch or at commands

I have been trying to run a unix script which contains many sql statements.I need to run this script every monday morning. I tried to run on command prompt, it works fine. But while I run it via batch or at command., it returns with library module could not be loaded (libcompat.1.o could not be loaded). I know it is an Environment problem. I contacted my administrator, he doesn't want to change environmental settings. Is there any way (some script to automate it with do-while loop on date with nohup.. something like it) or modification in script (eg. embedding Environmental settings in script itself) so that it could run in background while i log off or use it via batch command.
# 2  
Old 09-17-2006
You know it works for you. re-create your PATH and LD_LIBRARY_PATH (or SHLIB_PATH) environment variables in the script you want to run with at.
# 3  
Old 09-17-2006
see: man ld.so
perhaps LD_PRELOAD can help
# 4  
Old 09-17-2006
Re: Adding PATH and LD_LIBRARY_PATH

Hi Jim. Thanks for Help. Only thing I need to know is whether I have to use same existing PATH and LD_LIBRARY_PATH which is set right now or add some new lines to existing PATH and LD_LIBRARY_PATH for the script to run?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to batch-processing numerous shell scripts?

How to batch-processing numerous shell scripts? how to record the result of all the scripts as a report? then, I can analysis the process result. I want to process numerous shell scripts in my working directory: the directory name is consistent with shell scripts name, that is to say,... (2 Replies)
Discussion started by: qcmao
2 Replies

2. Shell Programming and Scripting

Running shell scripts from command

I have written a few shellscripts to run a videogame (starcraft) at different patched versions. For example bw113 runs the 1.13 version of the game. These works perfectly when I run them from command line (./bw113). However I cannot get it to work via mouseclick. Some Information: - I have... (5 Replies)
Discussion started by: lordsloth
5 Replies

3. Shell Programming and Scripting

Automatic running of Shell scripts

Hi, I have this problem of merging 2 shell scripts and run it one after the other. For eg: script A runs to give OutputA. This OutputA should become the input of script B which will run to give OuputB. Now this has to happen automatically i.e, script A and script B should run consecutively one... (1 Reply)
Discussion started by: Vindhyaauri
1 Replies

4. Shell Programming and Scripting

writing shell scripts of commands

can anyone help me in writing a shell script to visualize how simple commands work and on what logic. For Eg: ls command how it lists out all the files and directories, need to write a simple script based on the commands source code.:D (0 Replies)
Discussion started by: rahul_11d
0 Replies

5. UNIX for Dummies Questions & Answers

Automatically Running Scripts

Can someone advise me how to get started automatically running scripts? I believe it has something to do with cron? (4 Replies)
Discussion started by: jeffreydavisjr
4 Replies

6. Programming

Running shell commands from C/C++

Hi guys, I know using system() we can run unix commands but the problem is, I can't get any returns with the system(). I am returning stuff from my shell scripts that I need to be able to read from my C code. Anybody has cure to this problem? :)) Thanks (2 Replies)
Discussion started by: alirezan
2 Replies

7. Shell Programming and Scripting

batch file not running after implement dummy shell

Hi, I want to ask if anyone has any ideas, why the batch file i created to transfer files on my desktop doesn't run after i put this line in /etc/passwd and any idea to overcome it ? Thanks user:!:xxx:xxx::/home/user:/usr/local/bin/ssh-dummy-shell (2 Replies)
Discussion started by: DarReNz
2 Replies

8. UNIX for Dummies Questions & Answers

running vendor shell scripts

Does anyone run a lot of SH (shell script) commands from vendors. i.e... product installations. And do you edit/change as a rule of thumb? I done a lot of product installs and some tend to think we should edit/change a vendors SH script. I am just looking for your thoughts. Thanks. (1 Reply)
Discussion started by: Javagate
1 Replies

9. UNIX for Dummies Questions & Answers

Running shell scripts on a remote server

Hi - I am running Mac OS X (Terminal) at my current workstation, and I would like to telnet to my local server to run a shell script. The local server is a Solaris machine (don't know the version or the type of Unix being run on it, sorry.) The problem I have is that when I create a #!/bin/sh... (2 Replies)
Discussion started by: pepintheshort
2 Replies

10. UNIX for Dummies Questions & Answers

Cron running shell scripts.

What are the rules of calling shell scripts in cron. How do I go about setting up the correct PATHS that calls a script, which then calls another sub script all of which has to retain the orginal PATHS and VARS that I've set up in first script Confused.. ok Well Cron calls a script... (3 Replies)
Discussion started by: cfoxwell
3 Replies
Login or Register to Ask a Question