Creating endless job execution loops (intentionally!)

Hello.

An infinite loop is scary, isn’t it?

Hinemos’ Job Feature enables the creation of a complicated job flow by using various conditional branches, but just one wrong setting could cause an endless job flow (an infinite loop).

This time, we will set off an infinite loop of job execution intentionally to see how Hinemos behaves.

Setting procedure

  1. Create a command job. Select a command (e.g. sleep) randomly.

  1. Create a job notification. Select the job created in Step 1 as a target.

  1. Select the job notification created in Step 2 in the setting of the job created in Step 1.
    Leave the “Start” field blank (an infinite loop will be set off even if “Information” is selected).

 

That’s all for the setting.

Now, let’s execute the job created in Step 1!
*Make sure to use a test environment when executing the job.

Result


You can see an infinite loop of Job_A execution has been set off, where Job_A is executed again based on the notification received when the previous Job_A execution ends, and that notification causes execution of another Job_A.

■最後に

We do not recommend setting a job notification based on job result in Hinemos because such a setting may cause an infinite loop.

This infinite loop problem is described in the book titled “Introduction to [Practical] Integrated Management with Hinemos”(available in Japanese only) as shown below.

(4) Design Concept
Job notification is also not a function that directly conveys information about events that have occurred to the user. It is used in cases where complex processing is performed in interaction with the monitoring results, such as automatic recovery of a failed node or linkage with other products or systems.

It is also possible to define job notification based on job results. However, if the job definition or job notification definition is set incorrectly, an infinite loop of job notification and job execution will occur, and a new job may be launched forever. Therefore, unless there is a special requirement, it is not recommended to use job notification with job results.

This book provides practical information about Hinemos, from basic monitor and job settings to actual operations. Please click here to purchase it if you are interested!

That’s it for the brief explanation of an infinite loop of job execution in Hinemos. Thank you for reading.


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

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

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