Need help in running a script continuously non stop
Hi,
I am running a schedular script which will check for a specific time and do the job. I wanted to run this continuously. Meaning even after the if condition is true and it executes the job, it should start running again non stop.
I am using below script
The problem I am facing here is its not recognizing start command initially. So i am not able to optimise it. Can anyone help?
Last edited by vbe; 02-21-2013 at 05:33 AM..
Reason: code tags please
Hello,
I am ftping the file from one unix box to another box. This script works fine. Only problem here is, it is asking the password when ftp the file. How can i stop that. I am providing the password inside the shell script. But it is not accepting this. I need to put this script in crontab.... (5 Replies)
Hi
I have a script, which i ran in background, can someone please help in stopping this.
i gave this command:
ksh abc.ksh &
this script sends me a mail every 30 seconds. i have deleted the script but still i am getting the mails. can some one please help me stopping dese.
... (3 Replies)
Hi, I have googled for quite some time and couldn't able to get what exactly I am looking for.. My query is "how to stop a shell script which is running inside a remote server, using a script"??? can any one give some suggestions to sort this out. (1 Reply)
Hello members,
I have some doubts on how to write a script that can reports success / failure of a batch job ?
1. Run a batch job:
2. Wait and search for a particular string in the Log file:
tail -f log01*.txt | egrep -v "^SUCCESSFUL"
echo "continue with the other tasks"
... (1 Reply)
I have this "process keepalive" script:
#!/bin/bash
PIDFILE=/tmp/php.pid
PHPSCRIPT=/home/www/mydomain.com/subdomains/www/parser.php
echo 'Checking php process from PID file'
if ; then
PID=`cat $PIDFILE`
if ps ax | grep -v grep | grep $PID > /dev/null
then
echo "php process still... (4 Replies)
Hi all!!
Im using ksh and my OS is Linux.
I want to run a script for ten minutes, starting from my current system time.
How to acheive this?
Any help appreciated.
Thanks in advance (5 Replies)
Hi,
I want to write a script which continuously checking status of a script running in background by nohup command. And if same script is not running then immediately start the script...please help..
i am using below command to run script
nohup system_traps.sh &
but in some... (9 Replies)
Hi I have a shell script I would like to run it has to run twice a day every 5 seconds for an hour I can do this with cron but I was hoping there was an easier way. Is there a way to make a process sleep only at a certain time of day say between 1 and 2 pm? Or under certain conditions?
Any help... (8 Replies)
Hi,
I need to set up a script that would write the results of the ping command from one AIX server to another file may be every minute. Like this I need to gather the data for a period of 24 hours.
Can someone please help me with this?
G (5 Replies)
Hi
I have written below log monitoring script to egrep multiple words and redirect the output to a text file and its working fine but I want to add some more below given functionality to it, which is very advance and im not very good in it, so please help if you can :)
I am egrepping all the... (1 Reply)
Discussion started by: scazed
1 Replies
LEARN ABOUT DEBIAN
ns_job
ns_job(3aolserver) AOLserver Built-In Commands ns_job(3aolserver)__________________________________________________________________________________________________________________________________________________NAME
ns_job - commands
SYNOPSIS
ns_job option ?arg arg ...?
ns_job create ?-desc description? queueId ?maxthreads?
ns_job queue ?-detached? queueId script
ns_job wait ?-timeout seconds:microseconds? queueId jobId
ns_job waitany ?-timeout seconds:microseconds? queueId
ns_job cancel queueId jobId
ns_job delete queueId
ns_job jobs queueId
ns_job queues
ns_job threadlist
ns_job queuelist
ns_job joblist
ns_job genid
_________________________________________________________________DESCRIPTION
ns_job manages a thread pool and a set of named "queues". Queues have a max number of threads and when the current number of running thread
reaches "max" then jobs are queued.
New threads are created when there are less than maxthread number of idle threads.
OPTIONS
create
create ?-desc description? queueId ?maxthreads?
Create a new job queue called queueId. If maxthreads is not specified, then the default of 4 is used.
queue
queue ?-detached? queueId script
Add a new job to the queue. If there are less than maxthreads current running then the job will be started. If there are maxthreads
currently running then this new job will be queued.
If detached is true, then the job will be cleaned up when it completes; no wait will be necessary.
The new job's ID is returned.
wait
wait ?-timeout seconds:microseconds? queueId jobId
Wait for the specified queued or running job to finish. wait returns the results of the script.
An error is thrown if the specified timeout period is reached.
waitany
waitany ?-timeout seconds:microseconds? queueId
Wait for any job on the queue complete.
An error is thrown if the specified timeout period is reached.
cancel
cancel queueId jobId
Remove the specified job from the queue. If the job is currently running, then the job will be removed from the queue when it com-
pletes.
1 (true) is returned if the job is currently running and can not be cancelled.
delete
delete queueId
Request that the specified queue be deleted. The queue will only be deleted when all jobs are removed.
jobs
jobs queueId
Return a list of the job IDs.
queues
Returns a list of the queues IDs.
threadlist
Returns a list of the thread pool's fields.
maxthreads
Max number of threads for all the queues in the thread pool.
numthreads
Number of allocated threads.
numidle
Number of currently idle threads.
req
stop
The thread pools is being stopped. This probably means that the server is shutting down.
queuelist
Returns a list of the queues. A queue has the following fields:
name
Name of the queue.
desc
Description of the queue.
maxthreads
Max number of threads to run for this queue.
numrunning
Number of currently running jobs in this queue.
REQ
delete
Someone requested this queue be deleted. Queue will not be deleted until all the jobs on the queue are removed.
joblist
Returns a list the jobs in the specified queue. A job has the following fields:
id
Job's ID
state
scheduled
The job is schedule to run.
running
The job is currently running.
done
The job is has completed.
results
If the job has completed, then this field will contain the results. If the job is running or scheduled to run, then this will
contain the script.
code
When the job is done, this will contain the return code.
Codes
TCL_OK
TCL_ERROR
TCL_RETURN
TCL_BREAK
TCL_CONTINUE
TYPE
nondetached
detached
REQ
none
wait
cancel
genid
Generate a new unique ID. This new ID can be used as the queue ID without conflicting with any other queue ID.
BUGS SEE ALSO nsd(1), info(n)
KEYWORDS
ns_job
AOLserver 4.0 ns_job(3aolserver)