Scheduled Jobs

Release 1.0 - ...

Scheduled jobs are the replacement of what was known in Smartsite 5 as background components. They are configured in the smartsite.config file. Scheduled jobs can currently only be started on startup but that will be more flexible in the future.

This is a example configuration of the FileLinkCopyJob.

XML CopyCode image Copy Code
<scheduledjobs>
 <job name="FileLinkCopy"
           type="Smartsite.Core.FileLinkCopyJob, Smartsite.Runtime"
           account="john"
           enabled="true">
  <schedules>
   <schedule event="startup" />
  </schedules>
  <parameters>
   <parameter name="maxfilesize">100000</parameter>
   <parameter name="contenttype">flk</parameter>
  </parameters>
 </job>
</scheduledjobs>
Note that the attributes name, type and account are mandatory. The name attribute defines the name that is used to refer to the job, the type refers to the class that implements the IScheduledJob interface and account refers to the loginname of the user account that is used to run the job.  The parameters are optional and differ per scheduled job type. The parameters may be overridden when the job is started externally by e.g. the SignalSmartsite command line tool.

Job groups

Multiple jobs can be combined in a job group. This job group can be run like a normal job. The group will run all the jobs in it as if it were a single job. Job groups cannot be nested in other job groups.

Starting jobs externally

One of the ways to start a scheduled job externally is by using the SignalSmartsite command line tool in combination with Windows Scheduled Tasks. Add a new Scheduled Task in Windows and have it start SignalSmartsite with the proper command line parameters. This allows you to run scheduled jobs as any other scheduled task in Windows.

Topics