Reference > System URLs > Scheduler URLs


AddJob URL

This URL schedules a job on behalf of a site or store.

Timing of a scheduled job is specified by a start time and an interval. Scheduled jobs can be recurring, running at a specific interval, or only run once.


URL structure

http:// host_name/path/

The fully qualified name of the WebSphere Commerce Server and the configuration path.

Diagram of the URL structure: The URL starts with the fully qualified name of the WebSphere Commerce Server and the configuration path, followed by the URL name, AddJob , and the ? character. End the URL with a list of parameters in the form of name-value pairs. Separate each <a href=name-value pair with the & character. For a detailed description of the parameters and their values, see the list entitled Parameter values." />


Parameter values

langId

Sets or resets the preferred language for the duration of the session; the supported languages for a store are found in the STORELANG table.

URL

Required: The URL to be called when the command completes successfully.

name

The user on whose behalf the scheduler runs the job. This parameter is pulled from the LOGONID column in the USERREG table.

pathInfo

Required: The WebSphere Commerce command that will be run, for example SendTransactedMsg.

queryString

The parameters of the command that is to be run. All special characters, such as &, =, /, and ?, must be encoded.

start

Required: The time at which the first running of this job should occur, in the format: YYYY:MM:DD:HH:MM:SS; only the values HH:MM:SS are mandatory.

host

The name of the host allowed to run this job. If this parameter is omitted, the job can be run by any host. The parameter is only needed if the scheduler is running on multiple hosts and if a job needs to be restricted to one of them. The host name should be in the following form: name

interval

The number of seconds between successive runs of this job. If this parameter is omitted, the job is only run once.

attempts

The number of times that the scheduler retries the job, if it fails. This parameter should be used together with the delay parameter. Both parameters must be present to re-try the job.

delay

The number of seconds before a failed job is retried. This parameter should be used together with the attempts parameter. Both parameters must be present to re-try the job.

schedulePolicy

Specifies the policy to be used by the scheduler when the job has failed to run. Two possible values are defined:

  • 0 - The job is run only once and the next run is scheduled for the future; this is the default.

  • 1 - The job is run as many times as necessary to recover all missed runs.

priority

The number associated with the priority of this job. This value will be inserted into the SCCPRIORITY column of the SCHCONFIG table. A greater number indicates a higher priority job.

applicationType

The type of application used to run the job being added. The purpose of this parameter is to constrain resource-intensive jobs to a limited number of threads. The application types, and the rules governing their access to resources, are defined by the user in the XML server configuration file. The default application type is null.

storeId

The store that owns the scheduled job.

checkCmdId

A task command that implements the CheckForWorkCmd interface used to determine whether a command needs to be executed or not.


Example 1

The following example adds a job with a specified start time:

http://myhostname/webapp/wcs/stores/servlet/AddJob?start=2000:07:15:14:15:20
    
&pathInfo=InterestItemDisplay&URL=basemall.jsp&name=login999&queryString=listId%3D


Example 2

The following example schedules a job that places an order with a reference number of 3. It runs on behalf of the user wcsadmin, starting on February 21st, 2001 at 12:15 PM and repeats every 5 minutes (300 seconds). If the command fails, one attempt will be made to recover by running it once, 60 seconds after the failure:

    http://myhostname/webapp/wcs/stores/servlet/AddJob?pathInfo=OrderProcess
   
&parameters=orderId%3D3&interval=300&name=wcsadmin&start=2001:12:15:00:00:00
    &attempts=1&delay=60&URL=/demomall/basemall.html


Behavior


Exception conditions

Missing required parameters, or invalid parameter values.


Related concepts

Scheduler

Jobs


Related tasks

Schedule a site-level job

Related reference

ActivityCleanUp URL

AddBroadcastJob URL

CleanJob URL

EditJob URL

PaySynchronizePM URL

RaiseECEvent URL

RemoveJob URL

ScheduledDataDeploy URL

SchedCoupon URL

TicklerUnlockMonitor URL

System URLs

Scheduler data model


+

Search Tips   |   Advanced Search