Setting the Job Parameter as the Wait Rule

Hello.
In Hinemos, you can set various conditions and values as a job’s wait rule.

In the latest version (Hinemos ver.6.1), you can set the following as a wait rule.
– Job (end status)
– Job (end value)
– Time
– Time after session started (minutes)
– Job variable
– Cross session job (end status)
– Cross session job (end value)

In this article, we introduce you to the job parameter.

Let’s say there are jobs set as described below.

◯Configuration

◯Details
・Job1
→Checks whether a particular flag file exists, and executes Job 2 if the file exists, but skips Job 2 if the file does not exist.

・Job2
→The preceding job of Job 1. It will be executed only if the flag file exists.

・Job3
→The preceding job of Job 2. It will be executed if the end status of Job 2 is “Normal”.

Condition: All the jobs end with end status “Normal” regardless of whether the flag file exists or not.

◯Preparing the Script

First, create a script that “checks whether a flag file exists or not, and then returns a different value depending on whether the file exists or not”.

This time, we created a script that returns the following value if “flag_file” exists,

and returns the following value if the file does not exist.

◯Creating jobs
Create a job unit including the following command jobs.

Configure each command jobs as follows.

・Job1
1. Enter the command we tested on the console to Start Command field.


2. Click the “Command Result Extractor” button to display the “Command Result Extractor List”.


3. Enter the following values to the Name and Value fields, and check the checkbox saying “Read from standard output(Regular Expression)”.

・Job2
1.Enter the following on the wait rule setting screen.


2. Check the “End if condition unmatched” checkbox and set the end status and the end value as shown below.

*Specify a command such as “sleep 1” as the start command.

・Job3
1. Enter the following on the wait rule setting screen.

*Specify a command such as “sleep 1” as the start command.

That’s it for the setup!

Now let’s execute the job.

◯If the flag file (flag_file) exists

All jobs, including Job 2, were executed and ended with end status “Normal”.

◯If the flag file (flag_file) does not exist

Job 2 was not executed (number of executions: 0), and all the other jobs ended with end status “Normal”.

As you can see, the job parameter setting allows you to create a more complex sequence of jobs which was not possible with the end status and end value setting.

That’s it for today.
And as always, thanks for reading!


ご意見やお問い合わせについて

この記事へのご意見やお問い合わせについては、こちら(お問い合わせフォーム)もしくは
Hinemos営業担当【hsd-sales@atomitech.jp】までご連絡ください。

※お問い合わせフォームからご連絡の場合には、お問い合わせ内容で「Hinemosについて」を選択し、
 本文の冒頭に「Hinemos研究日記_【タイトル名】」とご記載ください。
※メールアドレスへご連絡の場合には、件名を「Hinemos研究日記_【タイトル名】」でご連絡ください。