You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

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:

{{

<source>
<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 pay attention to the matter that the variable name in parameter-values have no prefix, especially no "SCHEDULER_PARAM_". This prefix is used when JobScheduler variables are exported to environment variables to avoid contentions with other existing environment variables.

  • No labels