Обсуждение: Dependence between jobs

Поиск
Список
Период
Сортировка

Dependence between jobs

От
houssem jemel
Дата:
Hello

Can wy create rules between jobs like
Job 1 run if job 2 has run with success

Thanks






Re: Dependence between jobs

От
"Dave Page"
Дата:
On Thu, Jan 8, 2009 at 1:06 PM, houssem jemel <houssem20@yahoo.fr> wrote:
> Hello
>
> Can wy create rules between jobs like
> Job 1 run if job 2 has run with success
>

No, but you can do something like that using multiple steps within the
same job. If a step is set to Fail on error, subsequent steps will be
skipped. If you set it to Succeed or Ignore, then the following steps
will be executed.

-- 
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com


Re : Dependence between jobs

От
houssem jemel
Дата:
In that case we can not create e rule between two scripts on 2 different machines, since the job is assignet to one
machine 
Is there a solution to that ?



----- Message d'origine ----
De : Dave Page <dpage@pgadmin.org>
À : houssem jemel <houssem20@yahoo.fr>
Cc : pgadmin-support@postgresql.org
Envoyé le : Jeudi, 8 Janvier 2009, 14h23mn 00s
Objet : Re: [pgadmin-support] Dependence between jobs

On Thu, Jan 8, 2009 at 1:06 PM, houssem jemel <houssem20@yahoo.fr> wrote:
> Hello
>
> Can wy create rules between jobs like
> Job 1 run if job 2 has run with success
>

No, but you can do something like that using multiple steps within the
same job. If a step is set to Fail on error, subsequent steps will be
skipped. If you set it to Succeed or Ignore, then the following steps
will be executed.

--
Dave Page
EnterpriseDB UK:  http://www.enterprisedb.com






Re: Re : Dependence between jobs

От
"Dave Page"
Дата:
On Thu, Jan 8, 2009 at 1:50 PM, houssem jemel <houssem20@yahoo.fr> wrote:
> In that case we can not create e rule between two scripts on 2 different machines, since the job is assignet to one
machine
> Is there a solution to that ?

No. You could potentially use some creative scripting and scp/ssh to
have one machine write the success or failure of a job to a location
that the other can inspect.

-- 
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com


Re : Re : Dependence between jobs

От
houssem jemel
Дата:
Why can we not use the parameter of the step "succed" "failed" in the pgadmin in order to inject it to another step or
anotherjob 



----- Message d'origine ----
De : Dave Page <dpage@pgadmin.org>
À : houssem jemel <houssem20@yahoo.fr>
Cc : pgadmin-support@postgresql.org
Envoyé le : Jeudi, 8 Janvier 2009, 14h58mn 51s
Objet : Re: Re : [pgadmin-support] Dependence between jobs

On Thu, Jan 8, 2009 at 1:50 PM, houssem jemel <houssem20@yahoo.fr> wrote:
> In that case we can not create e rule between two scripts on 2 different machines, since the job is assignet to one
machine
> Is there a solution to that ?

No. You could potentially use some creative scripting and scp/ssh to
have one machine write the success or failure of a job to a location
that the other can inspect.

--
Dave Page
EnterpriseDB UK:  http://www.enterprisedb.com






Re: Re : Re : Dependence between jobs

От
"Dave Page"
Дата:
On Thu, Jan 8, 2009 at 2:56 PM, houssem jemel <houssem20@yahoo.fr> wrote:
> Why can we not use the parameter of the step "succed" "failed" in the pgadmin in order to inject it to another step
oranother job
 

Nobody ever asked for or proposed such functionality. You could use a
trigger to do some funky stuff like that though - watch for the
appropriate inserts on pgagent.pga_jobsteplog and then have it modify
other jobs (or better, some control table that your other jobs
consult) as required.

-- 
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com