Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Table of Contents
outlinh1. true
outlinh1. true
1printablefalse
2stylh1. none
3indent20px

The managed database Jobs (JobSchedulerManagedDatabaseJob, JobSchedulerManagedDBReportJob, JobSchedulerManagedCustomReportJob) support replacing variables inside the <command> parameter.
However, with simple job configurations (e.g. no job chain node paramteters) the ${parameter} Synthax can not be used, as Job Scheduler has the habit of removing ${parameter} before the job can read it and replace the parameters.

So, instead §{parameter} can be used:{{

Code Block

...

<job title="DB Report" order="no">

...

 

	<description><include file="jobs/JobSchedulerManagedDBReportJob.xml"/></description>

...

 
	<params> 
		<param name="command" value="SELECT COUNT(ID) FROM

...

 §{TABLE_NAME}

...

"/>

...

 
		<param name="database_connection" value="test01"/>

...

 
		<param name="TABLE_NAME" value="employees"/>

...

 
	</params>

...


	<script language="java"

...

  
		java_class="sos.scheduler.managed.JobSchedulerManagedDBReportJob"/>

...

 
	<run_time/>

...



</job>

</source>
}}please Please pay attention to the matter that the variable name in parameter-values have no prefix, especially no "SCHEDULER_PARAM_". This prefix is used only when JobScheduler variables are exported to environment variables, just to avoid contentions with other existing environment variables.