Operating System - HP-UX
1757062 Members
2213 Online
108858 Solutions
New Discussion юеВ

Re: 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 3
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.