Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
General
cancel
Showing results for 
Search instead for 
Did you mean: 

How to control the execution of batch job as and when desired

SOLVED
Go to solution
Suman_7
Frequent Advisor

How to control the execution of batch job as and when desired

All,

How do I control the execution of a batch job that is exeucted through a script that I have written. Basically this script is an infinite loop which goes and executes after every 24 hrs. The users want their control on this script so they can stop and start it as they need.
So far I have one solution by creating a flag in a control table which this script will look and continue if this is set to TRUE. If the users want that script should not be executed they can update this falg to FALSE.

Is there any way I can do this at UNIX level instead of going in the backend.

Thank You,
3 REPLIES
Navin Bhat_2
Trusted Contributor

Re: How to control the execution of batch job as and when desired

You could issue a kill -SIGSTOP and kill - SIGCONT.
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: How to control the execution of batch job as and when desired

This is probably better done using a cronjob fired off daily at some designated time. You cronjob might look for a file and if present exit immediately. I would create a small script to either create or rm this file as a means of user control.
If it ain't broke, I can fix that.
Sanjay Kumar Suri
Honored Contributor

Re: How to control the execution of batch job as and when desired

If the user has the authority to use cron then the user can as well create an entry in the his/her crontab and hash (#) the same if the job need not to be run.

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.