Fwd: T24:Service running automatically on particular time

2,509 views
Skip to first unread message

Talha Naushahi

unread,
Feb 15, 2010, 1:11:52 AM2/15/10
to jb...@googlegroups.com

Hi All,
R08.003
JBASE 5.13
AIX
ORACLE

I need a service to execute automatically on a particular time daily.
Is it possible to give the time in TSA.SERVICE or in any other application??? and according to that time the service starts automatically daily.

thnx

Talha

Jim Idle

unread,
Feb 15, 2010, 1:38:33 AM2/15/10
to jb...@googlegroups.com

I did  not have the heart to reject your post for a fourth time, but let me point out that you cannot have read the posting guidelines despite me asking you 3 times. Specifically, if you had included the jdiag.out (instructions are in the posting guidelines), then apart from Oracle, we would know all of the other information. As it is, we still do not know much. What version of AIX? What version of Oracle? What type of program do you want to run? Long running? Short running?

 

Still, there is now probably enough information for someone to answer this.

 

Please guys! Read the posting guidelines!!!

 

Jim

 

--
Please read the posting guidelines at: http://groups.google.com/group/jBASE/web/Posting%20Guidelines
 
IMPORTANT: Type T24: at the start of the subject line for questions specific to Globus/T24
 
To post, send email to jB...@googlegroups.com
To unsubscribe, send email to jBASE-un...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

JOSE L MARTINEZ-AVIAL

unread,
Feb 15, 2010, 2:23:27 AM2/15/10
to jb...@googlegroups.com
I agree with Jim, you should provide more info. A jdiag output will say everything, and takes about 15 seconds, including the Copy & Paste. There are no useful answers to incomplete questions.

It all depends on what you want. Do you want it to run every working day or calendar day? At a determined time? How long does it take? Do you need the process to run under a user logged in the system? Depending on this, you have a lot of options. You can use a cron for that (Seems the most appropriate thing to do, with the amount of information you provided. You can add it to the COB, in a separated job. Where I work we have a service that runs every day after the COB, maybe you should think of it. Of course, it can be a mix of those solutions. Maybe a cron that launches a service daily? That's not complicated to do.

Explain exactly what you need, and provide enough information, and somebody will give you something to work with.
Jose


2010/2/15 Jim Idle <ji...@temporal-wave.com>

jaro

unread,
Feb 15, 2010, 7:20:52 AM2/15/10
to jBASE
Hi,

to schedule the t24 services to run at specific times the best option
is to manage it locally with a small development. I don't think the
t24 support this task naturaly.

Talha Naushahi

unread,
Feb 16, 2010, 12:35:14 AM2/16/10
to jb...@googlegroups.com
thnx jose n jim,
 
"It all depends on what you want."
I need a service to run daily at 8:00am and stops when the work is finish. The service just checks a file in directory and uploads the data in t24.
 
"Do you want it to run every working day or calendar day?At a determined time? "
every working day at 8:00am
 
"How long does it take?"
5min
 
Do you need the process to run under a user logged in the system?
nop
 
Solution:
 
Thanks to avin who told me that we can specify the time in TSA.WORKLOAD.PROFILE. I have tested my service (AUTO) and it starts automatically at the time specified in  TSA.WORKLOAD.PROFILE but as the service is set as AUTO in the TSA.SERVICE, it does not ends after running once.
Attaching service on COB will not helpfull as the requirement is totally different.
jose can you enlighten more about cron? i dont know how it works but it seems to be helpfull.
 
regards,
Talha

JOSE L MARTINEZ-AVIAL

unread,
Feb 16, 2010, 7:32:33 AM2/16/10
to jb...@googlegroups.com
Cron or crontab is a Unix standard utility to schedule jobs. For what I've seen Aix supports cron, but you will need to check the documentation. Basically you can setup a script like the following:

cd ~myuser
. /setEnvironment.sh
echo "AVISA.SEC.WO.DEPOSITARY" | $JBCRELEASEDIR/bin/jsh
exit

and create the following line in the crontab list
00 08 * * * /path/to/the/script/myScript.sh

This will execute the program AVISA.SEC.WO.DEPOSITARY at 8:00 AM every day. You will need to setup a script with all the environment variables needed(path, all Jbase variables, etc), since cron jobs run under the uses that created them, but .profile is not executed. Remember that you need to use a program, not a subroutine, in order to be executed from jbase shell.

I hope it helps.
Jose

2010/2/16 Talha Naushahi <talha.n...@gmail.com>

jaro

unread,
Feb 16, 2010, 12:40:41 PM2/16/10
to jBASE
You can do one easy thing. Create a simple local table where the
records ID will be service name. the record will contain the fields
like start time, end time, and possible other fields like whether to
run every day or specific day etc.
Then you need a background program that will work on the top of this
table and will change the SERVICE.CONTROL field in TSA.SERVICE to
START/AUTO or STOP for the corresponding services.
This program can be another service with AUTO running or the
background process started as PHANTOM after the COB automatically or
any other. There are many ways how to do it.

On Feb 16, 1:32 pm, JOSE L MARTINEZ-AVIAL <jlm...@gmail.com> wrote:
> Cron or crontab is a Unix standard utility to schedule jobs. For what I've
> seen Aix supports cron, but you will need to check the documentation.
> Basically you can setup a script like the following:
>
> cd ~myuser
> . /setEnvironment.sh
> echo "AVISA.SEC.WO.DEPOSITARY" | $JBCRELEASEDIR/bin/jsh
> exit
>
> and create the following line in the crontab list
> 00 08 * * * /path/to/the/script/myScript.sh
>
> This will execute the program AVISA.SEC.WO.DEPOSITARY at 8:00 AM every day.
> You will need to setup a script with all the environment variables
> needed(path, all Jbase variables, etc), since cron jobs run under the uses
> that created them, but .profile is not executed. Remember that you need to
> use a program, not a subroutine, in order to be executed from jbase shell.
>
> I hope it helps.
> Jose
>

> 2010/2/16 Talha Naushahi <talha.naush...@gmail.com>

> >> 2010/2/15 Jim Idle <j...@temporal-wave.com>


>
> >>   I did  not have the heart to reject your post for a fourth time, but
> >>> let me point out that you cannot have read the posting guidelines despite me

> >>> asking you 3 times. Specifically, if you had included the jdiag.out(instructions are in the posting guidelines), then apart from Oracle, we


> >>> would know all of the other information. As it is, we still do not know
> >>> much. What version of AIX? What version of Oracle? What type of program do
> >>> you want to run? Long running? Short running?
>
> >>> Still, there is now probably enough information for someone to answer
> >>> this.
>
> >>> Please guys! Read the posting guidelines!!!
>
> >>> Jim
>

> >>> *From:* jb...@googlegroups.com [mailto:jb...@googlegroups.com] *On
> >>> Behalf Of *Talha Naushahi
> >>> *Sent:* Sunday, February 14, 2010 10:12 PM
> >>> *To:* jb...@googlegroups.com
> >>> *Subject:* Fwd: T24:Service running automatically on particular time

avinash d

unread,
Feb 16, 2010, 11:51:01 PM2/16/10
to jb...@googlegroups.com
Hi,

I would suggest to do the following,

1) Create a TSA.WORKLOAD.PROFILE record with the time you need to start the service.You can specify the time in the field TIME.
2) Attach this record to all the TSA.SERVICE records you want to start by the specified time.You can attach the workload profile id to the field WORK.PROFILE in the TSA.SERVICE record.
3) Set the SERVICE.CONTROL in TSA.SERVICE record to START. Setting this to START will make sure that the service runs only once.Once the service finishes processing then the SERVICE.CONTROL will be set to STOP.
   If you want to start it automatically every day then i would suggest you to write a COB routine that will reset the SERVICE.CONTROL to START in all the TSA.SERVICE records that you want this setup. This will make sure that the service starts at the specified time.
 
Cheers,
Avinash

VK

unread,
Feb 17, 2010, 1:16:23 AM2/17/10
to jBASE
Hi,
even the easier way: in TSA.WORKLOAD.PROFILE you can specify how many
agents you need at particular time of day. Don't know if it
understands 0 (value disappears after input). Give it a try, e.g.:

WORKLOAD.PROFILE.. TEST

------------------------------------------------------------------------------
1 DESCRIPTION....... TEST
2. 1 TIME........... 8:00
3. 1 AGENTS.REQUIRED 1
2. 2 TIME........... 8:30
3. 2 AGENTS.REQUIRED

VK

Adnan Bin Wasim

unread,
Feb 17, 2010, 2:52:02 AM2/17/10
to jb...@googlegroups.com
The TIME FIELD of the WORKLOAD.PROFILE only works if you want to
execute no. of agents on a specified time. Further, if the agent is
supposed to trigger at 9:00 am and you start service at 10:00 am the
agent will still be triggered (i.e SYSTEM TIME GE SPECIFIED TIME =
TRIGGER AGENT) . Also, if you are starting the service in AUTO mode
then the service keeps on going after the specified time without
stopping. So sum it up, the TIME field will not help you achieve what
you exactly require.

Regards,

Adnan Bin Wasim

Richard W

unread,
Feb 17, 2010, 1:19:16 PM2/17/10
to jBASE

On 16 feb, 06:35, Talha Naushahi <talha.naush...@gmail.com> wrote:
> thnx jose n jim,
>
> "It all depends on what you want."
> I need a service to run daily at 8:00am and stops when the work is finish.
> The service just checks a file in directory and uploads the data in t24.
>
> "Do you want it to run every working day or calendar day?At a determined
> time? "
> every working day at 8:00am
>
> "How long does it take?"
> 5min
>
> Do you need the process to run under a user logged in the system?
> nop
>
> Solution:
>
> Thanks to avin who told me that we can specify the time in
> TSA.WORKLOAD.PROFILE. I have tested my service (AUTO) and it starts
> automatically at the time specified in  TSA.WORKLOAD.PROFILE but as the
> service is set as AUTO in the TSA.SERVICE, it does not ends after running
> once.
> Attaching service on COB will not helpfull as the requirement is totally
> different.
> jose can you enlighten more about cron? i dont know how it works but it
> seems to be helpfull.

Hi put it to start instead of auto, then it will only run one time


>
> regards,
> Talha
>
> On Mon, Feb 15, 2010 at 10:23 AM, JOSE L MARTINEZ-AVIAL <jlm...@gmail.com>wrote:
>
>
>
> > I agree with Jim, you should provide more info. A jdiag output will say
> > everything, and takes about 15 seconds, including the Copy & Paste. There
> > are no useful answers to incomplete questions.
>
> > It all depends on what you want. Do you want it to run every working day or
> > calendar day? At a determined time? How long does it take? Do you need the
> > process to run under a user logged in the system? Depending on this, you
> > have a lot of options. You can use a cron for that (Seems the most
> > appropriate thing to do, with the amount of information you provided. You
> > can add it to the COB, in a separated job. Where I work we have a service
> > that runs every day after the COB, maybe you should think of it. Of course,
> > it can be a mix of those solutions. Maybe a cron that launches a service
> > daily? That's not complicated to do.
>
> > Explain exactly what you need, and provide enough information, and somebody
> > will give you something to work with.
> > Jose
>

> > 2010/2/15 Jim Idle <j...@temporal-wave.com>


>
> >   I did  not have the heart to reject your post for a fourth time, but let
> >> me point out that you cannot have read the posting guidelines despite me

> >> asking you 3 times. Specifically, if you had included the jdiag.out(instructions are in the posting guidelines), then apart from Oracle, we


> >> would know all of the other information. As it is, we still do not know
> >> much. What version of AIX? What version of Oracle? What type of program do
> >> you want to run? Long running? Short running?
>
> >> Still, there is now probably enough information for someone to answer
> >> this.
>
> >> Please guys! Read the posting guidelines!!!
>
> >> Jim
>

> >> *From:* jb...@googlegroups.com [mailto:jb...@googlegroups.com] *On Behalf
> >> Of *Talha Naushahi
> >> *Sent:* Sunday, February 14, 2010 10:12 PM
> >> *To:* jb...@googlegroups.com

> >> *Subject:* Fwd: T24:Service running automatically on particular time

> >http://groups.google.com/group/jBASE?hl=en- Tekst uit oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -

VK

unread,
Feb 18, 2010, 3:29:09 AM2/18/10
to jBASE
Hi,

Quote:

"The TIME FIELD of the WORKLOAD.PROFILE only works if you want to
execute no. of agents on a specified time. Further, if the agent is
supposed to trigger at 9:00 am and you start service at 10:00 am the
agent will still be triggered (i.e SYSTEM TIME GE SPECIFIED TIME =
TRIGGER AGENT) "

Sorry you're not correct. If you set your workload profile the
following way you will have it triggered (provided that you put START
to TSA.SERVICE record) only during the period from 8am to 8:05am.
Tested under R09.

WORKLOAD.PROFILE.. KZM.SRV

------------------------------------------------------------------------------
1 DESCRIPTION....... KZM.SRV
2. 1 TIME........... 07:55
3. 1 AGENTS.REQUIRED
2. 2 TIME........... 08:00
3. 2 AGENTS.REQUIRED 1
2. 3 TIME........... 08:05
3. 3 AGENTS.REQUIRED

VK

> > >http://groups.google.com/group/jBASE?hl=en-Tekst uit oorspronkelijk bericht niet weergeven -

Adnan Bin Wasim

unread,
Feb 19, 2010, 12:28:48 AM2/19/10
to jb...@googlegroups.com
I agree with VK , it is a way around but still you 've to START the
service manually ........Any brilliant idea to have it automated too
(VK).....

avinash d

unread,
Feb 19, 2010, 1:04:12 AM2/19/10
to jb...@googlegroups.com
Hi Adnan Bin Wasim

If at all you claim is that the service cannot be schedule using TSA.SERVICE and TSA.WORKLOAD.PROFILE then you are mistaken. The setup provided by VK will work perfectly fine with a minor change(setting it to AUTO and not to START) triggering the service at the specified time every day.Putting it to START,the status will change to STOP once the service completes processing which is not favorable for the daily processing.

REVIEW.TIME has to be considered while setting this which shouldn't fall outside the time specified for the triggering process.This setup will also restrict your claim that the service will be triggered after the specified time.

Regards,
Avinash

Harish Venugopal

unread,
Feb 19, 2010, 10:51:12 AM2/19/10
to jb...@googlegroups.com
Guys,

         For unix, there is something called as "CRON TAB" that can be used here. Can you check the details of how to implement it? you will probably need to make use of shell script to get this working. Not an expert in UNIX but did manage to get this working once. This is very similar to the windows scheduler.
 
Hope this atleast provides a starting point for your research.
 
Regards,
Harish

Manoj Mugundan

unread,
Feb 22, 2010, 5:13:24 AM2/22/10
to jb...@googlegroups.com
Hi Friends,
 
I think solution suggested by Avinash is easiest way. I have tried the same here. It works fine. Only thing we have to write small local batch routine to reset the SERVICE.CONTROL to START.
 
Regards,
Manoj.
Reply all
Reply to author
Forward
0 new messages