<?xml version="1.0" encoding="utf-8"?>
<ManualTopic ID="/baanerp/tt/onlinemanual/job_data_procedure" xml:lang="en">
	<Header>
		<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">Job data procedure</Title>
		<Keyword ContextSensitive="No"><Level1>Job management</Level1>
			<Level2>job data procedure</Level2>
		</Keyword>
	</Header>
	<GeneralSection><SectionTitle>Procedure aim</SectionTitle>
		<Paragraph class="Default">
                              ERP LN ’s Job management contains the procedures that you can use to create jobs, and define the time and date in which the job must be carried out in the job calendar.</Paragraph>
	</GeneralSection>
	<GeneralSection><SectionTitle>Procedure result and prerequisites</SectionTitle>
		<GeneralSection><SectionTitle>Result</SectionTitle>
			<Paragraph class="Default">A job ready to be started.</Paragraph>
		</GeneralSection>
		<GeneralSection><SectionTitle>Prerequisites</SectionTitle>
			<Paragraph class="Default">No prerequisites are required for the environment.</Paragraph>
		</GeneralSection>
	</GeneralSection>
	<ProcedureSection><SectionTitle>Procedure summary</SectionTitle>
		<ProcIntro><Paragraph class="Default">Before you can use periodical jobs in ERP LN, you must complete the following steps to define a job calendar and the basic job data. In ERP LN, you can start periodical jobs according to a schedule that is defined in the job calendar or a regular interval. You can define the interval in the basic job data. After you define the basic job data, you can add sessions and shell commands to the job. The default settings of the sessions in the job can be maintained, when necessary, with an optional step in the procedure.</Paragraph>
		</ProcIntro>
		<Figure space-and-orientation="indented-estimated"><FigIntro>The following figure illustrates the sessions in the basic job procedure:</FigIntro>
			<HTML:IMG width="560" height="541" SRC="../images/tr_graph_job_data_procedure.gif" path="/enterpriseserver/tools/tt/onlinemanual" btb-count="1" btb-count2="1" btb-image-name="tr_graph_job_data_procedure.gif" btb-source-path="C:\SVN\docnl\Technology\EnterpriseServer~8.5\EnterpriseServer" btb-image-path="/enterpriseserver/tools/tt/images/tr_graph_job_data_procedure.gif" ID="IDACDYBC" alt="[...]" xmlns:HTML="http://www.w3.org/TR/REC-html40"/></Figure>
		<Steps><Step><StepTitle>Create a job calendar</StepTitle>
				<Paragraph class="Default">To start periodical jobs, you can use a job calendar. The job calendar contains the dates and times the job must be carried out.</Paragraph>
				<Paragraph class="Default">Session <Link href="/baanerp/tt/aad/ttaad5106m000" role="session">Calendars (ttaad5106m000)</Link>.</Paragraph>
			</Step>
			<Step><StepTitle>Specify the dates in a job calendar</StepTitle>
				<Paragraph class="Default">In the job calendar, you must define the date and time that the job must be started.</Paragraph>
				<Paragraph class="Default">Session <Link href="/baanerp/tt/aad/ttaad5107m000" role="session">Dates by Calendar (ttaad5107m000)</Link>
				</Paragraph>
			</Step>
			<Step><StepTitle>Define the basic job data</StepTitle>
				<Paragraph class="Default">Before you can add sessions to a job with the <Link href="/baanerp/tt/aad/ttaad5102s000" role="session">Add Session to Job (ttaad5102s000)</Link> session, you must first define the basic parameters for the job. To make a periodical job non-interactive, in the sessions <Link href="/baanerp/tt/aad/ttaad5500m000" role="session">Job Data (ttaad5500m000)</Link> and <Link href="/baanerp/tt/aad/ttaad5100s000" role="session">Job Data (ttaad5100s000)</Link>, you can specify a predefined job calendar or a regular interval to start the job.</Paragraph>
				<Paragraph class="Default">If you select the <GUIRef href="" role="manual">Suspend Job until Next Execution</GUIRef> check box, the job is suspended until the next execution date. For jobs started by the <Link href="/baanerp/tt/aad/ttaad5203m000" role="session">Activate Job (ttaad5203m000)</Link> session, the UNIX shell program rc.startjob, or the Windows batch file startjob.bat, the job’s status is set to <GUIRef href="" role="manual">Waiting</GUIRef>. The job is automatically restarted at every subsequent execution date that is defined in the calendar.</Paragraph>
				<Paragraph class="Default">If you clear the <GUIRef href="" role="manual">Suspend Job Until Next Execution</GUIRef> check box, the job is carried out once and then terminated. For jobs started by the <Link href="/baanerp/tt/aad/ttaad5203m000" role="session">Activate Job (ttaad5203m000)</Link> session, the UNIX shell program rc.startjob, or the Windows batch file startjob.bat, the job’s status is set to <GUIRef href="" role="manual">Free</GUIRef>. To restart the job, you must manually start the <Link href="/baanerp/tt/aad/ttaad5203m000" role="session">Activate Job (ttaad5203m000)</Link> session, the UNIX shell program rc.startjob, or the Windows batch file startjob.bat.</Paragraph>
			</Step>
			<Step><StepTitle>Add sessions to a job</StepTitle>
				<Paragraph class="Default">A job must contain one or more sessions, which must be carried out according to the data specified in the session <Link href="/baanerp/tt/aad/ttaad5100s000" role="session">Job Data (ttaad5100s000)</Link> session. Typically, a job starts print or process sessions.</Paragraph>
				<Paragraph class="Default">Under Error Handling, you can enter how ERP LN must continue if an error occurs during the execution of the session. You can, for example, indicate that ERP LN must execute, or skip, a number of sessions of the job if an error occurs during the execution of the session.</Paragraph>
			</Step>
			<Step><StepTitle>Add a shell command to the job</StepTitle>
				<Paragraph class="Default">This procedure is optional, and you can use this session to link the job to a shell command to a job to manipulate the command’s execution. To ensure that the shell command has the right effect on the job, you must test the script. Typically, to test the job and shell script, you can redirect the output to a file or printer. You can redirect the output to a file or printer with one of the operating system's output redirection facilities.</Paragraph>
				<Paragraph class="Default">Session <Link href="/baanerp/tt/aad/ttaad5205m000" role="session">Add Shell Command to Job (ttaad5205m000)</Link>.</Paragraph>
			</Step>
			<Step><StepTitle>Change the default settings of the sessions in the job</StepTitle>
				<Paragraph class="Default">This procedure is optional, and you can use this procedure to change the settings of the sessions that are linked to the job. For example, you can change the execution order of the sessions or the device to which the output of a session is sent.</Paragraph>
				<Paragraph class="Default">Session <Link href="/baanerp/tt/aad/ttaad5501m000" role="session">Sessions by Job (ttaad5501m000)</Link>.</Paragraph>
			</Step>
		</Steps>
	</ProcedureSection>
</ManualTopic>
