Update environment on jobs

8 views
Skip to first unread message

aked...@gmail.com

unread,
Sep 19, 2022, 3:49:17 PM9/19/22
to schedulix
Hello,
I have to update several hundred jobs to a new environment on our Schedulix server. Is there a way to quickly update the environment (under the Run tab) on all jobs? I tried setting the environment on the top level folder and cascading it to the set group but didn't have any luck. 

Thank you,
Andrew

Dieter Stubler

unread,
Sep 20, 2022, 4:06:08 AM9/20/22
to schedulix
Hi,

sdmsh is you friend here.

Use a select statement within sdmsh to select all your job definitions you want to change the environment on.

Example to select ALL jobs:

select
    se.id as fullname
from
    sci_c_scheduling_entity se
where
    se.type = 'JOB'
with
    fullname folder quoted;


sdmsh allows the with option to translate the job definition id to a pathname (optionally quoted)
Add any joins and selections to get the list of your candidates to alter.

process the output of the select to generate sdmsh commands like:

alter job defintion <fullname from query> with environment = '<new environment name>'

Dieter Stubler

unread,
Sep 20, 2022, 4:08:26 AM9/20/22
to schedulix
Sry, posted accidentally to early.

Then run your generated statements using sdmsh again to change your environments.

Regards
Dieter
Reply all
Reply to author
Forward
0 new messages