Files
doc-exports/docs/dataartsstudio/umn/dataartsstudio_01_7523.html
chenxiaoxiong f9e2808b7c DataArts UMN 20250810 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: chenxiaoxiong <chenxiaoxiong@huawei.com>
Co-committed-by: chenxiaoxiong <chenxiaoxiong@huawei.com>
2025-09-02 10:44:13 +00:00

66 lines
9.6 KiB
HTML

<a name="dataartsstudio_01_7523"></a><a name="dataartsstudio_01_7523"></a>
<h1 class="topictitle1">Setting the Job Scheduling Time to the Last Day of Each Month</h1>
<div id="body0000001541098465"><div class="section" id="dataartsstudio_01_7523__section1915412852213"><h4 class="sectiontitle">Scenario</h4><p id="dataartsstudio_01_7523__p422816159222">When configuring job scheduling, you can set the scheduling time to the last day of each month using either of the two methods provided in the following table.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dataartsstudio_01_7523__table195983425615" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Setting the scheduling time to the last day of each month</caption><thead align="left"><tr id="dataartsstudio_01_7523__row1059819421166"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.1.3.2.4.1.1"><p id="dataartsstudio_01_7523__p1859818428611">Method</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.1.3.2.4.1.2"><p id="dataartsstudio_01_7523__p7598164216614">Advantage</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.1.3.2.4.1.3"><p id="dataartsstudio_01_7523__p175983421961">Procedure</p>
</th>
</tr>
</thead>
<tbody><tr id="dataartsstudio_01_7523__row17598442766"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.1.3.2.4.1.1 "><p id="dataartsstudio_01_7523__p1059818421167">Set the scheduling frequency to every day and use a condition expression to determine whether a day is the last day of each month.</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.1.3.2.4.1.2 "><p id="dataartsstudio_01_7523__p195982429612">This method applies to multiple scenarios. You can compile condition expressions to flexibly schedule jobs, for example, on the last day or 7th of each month.</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.1.3.2.4.1.3 "><p id="dataartsstudio_01_7523__p659813426615"><a href="#dataartsstudio_01_7523__section9574744142213">Method 1</a></p>
</td>
</tr>
<tr id="dataartsstudio_01_7523__row559817428617"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.1.3.2.4.1.1 "><p id="dataartsstudio_01_7523__p115987427614">Set the scheduling frequency to every month and select the last day of each month.</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.1.3.2.4.1.2 "><p id="dataartsstudio_01_7523__p185986428619">You can set a specific job scheduling time instead of compiling any statements.</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.1.3.2.4.1.3 "><p id="dataartsstudio_01_7523__p7598242064"><a href="#dataartsstudio_01_7523__section20721666465">Method 2</a></p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="dataartsstudio_01_7523__section9574744142213"><a name="dataartsstudio_01_7523__section9574744142213"></a><a name="section9574744142213"></a><h4 class="sectiontitle">Method 1</h4><p id="dataartsstudio_01_7523__p0267249102219">In DataArts Studio, create a job that is scheduled every day and add an empty Dummy node (which does not process data) to the job. You can set a condition expression on the connection line between the Dummy node and its subsequent node to check whether the current day is the last day of the current month. If it is the last day, the subsequent nodes are executed. Otherwise, the subsequent nodes are skipped.</p>
<ol id="dataartsstudio_01_7523__ol8970144143213"><li id="dataartsstudio_01_7523__li189708414327">In the left navigation pane of the DataArts Factory console, choose <span class="menucascade" id="dataartsstudio_01_7523__en-us_topic_0181491853_en-us_topic_0099797006_menucascade12634646125010"><b><span class="uicontrol" id="dataartsstudio_01_7523__en-us_topic_0181491853_en-us_topic_0099797006_uicontrol1063494615015"><span id="dataartsstudio_01_7523__en-us_topic_0181491853_en-us_topic_0099797006_text1563414615503">Data Development</span></span></b> &gt; <b><span class="uicontrol" id="dataartsstudio_01_7523__en-us_topic_0181491853_en-us_topic_0099797006_uicontrol14634104655019"><span id="dataartsstudio_01_7523__en-us_topic_0181491853_en-us_topic_0099797006_text126341046105013">Develop Job</span></span></b></span>.</li><li id="dataartsstudio_01_7523__li8331163643613">Set <strong id="dataartsstudio_01_7523__b417510416289">Scheduling Frequency</strong> to <strong id="dataartsstudio_01_7523__b094938202811">Every day</strong>.<div class="fignone" id="dataartsstudio_01_7523__fig18451830183111"><span class="figcap"><b>Figure 1 </b>Setting Scheduling Frequency to Every day</span><br><span><img id="dataartsstudio_01_7523__image49641651151115" src="en-us_image_0000002234243360.png" title="Click to enlarge" class="imgResize"></span></div>
<p id="dataartsstudio_01_7523__p35021836175520"></p>
<p id="dataartsstudio_01_7523__p657114475413"></p>
</li><li id="dataartsstudio_01_7523__li204039577362">Right-click the connection line between the Dummy node and its subsequent node and select <strong id="dataartsstudio_01_7523__b124820379304">Set Condition</strong> to configure a condition expression that is used to determine whether to execute the subsequent node.<div class="fignone" id="dataartsstudio_01_7523__fig44871203615"><span class="figcap"><b>Figure 2 </b>Configuring a condition expression</span><br><span><img id="dataartsstudio_01_7523__image1629811211120" src="en-us_image_0000002269202797.png" title="Click to enlarge" class="imgResize"></span></div>
<p id="dataartsstudio_01_7523__p19770429573"></p>
</li><li id="dataartsstudio_01_7523__li69210334386">Configure the expression as follows:<pre class="screen" id="dataartsstudio_01_7523__screen6339205014390">#{DateUtil.getDay(DateUtil.addDays(Job.planTime,1)) == 1 ? "true" : "false"}</pre>
<p id="dataartsstudio_01_7523__p24241534183815">The expression is used to obtain the current time and check whether the next day is 1st of a month. If yes, the current day is the last day of the current month, and the subsequent node will be executed; if no, the subsequent node will be skipped.</p>
<div class="fignone" id="dataartsstudio_01_7523__fig1376820417421"><span class="figcap"><b>Figure 3 </b>Condition expression</span><br><span><img id="dataartsstudio_01_7523__image1768204184215" src="en-us_image_0000002269202825.png" title="Click to enlarge" class="imgResize"></span></div>
<p id="dataartsstudio_01_7523__p175881418598"></p>
<p id="dataartsstudio_01_7523__p1501105411203">For example, if you want a job to be executed on the last day of each month, perform the above operations.</p>
<p id="dataartsstudio_01_7523__p18120172713447">For example, if you want a job to be executed on the seventh day of each month, perform the following operations:</p>
<p id="dataartsstudio_01_7523__p615513814453">Configure the following expression to check whether the current day is 7th:</p>
<pre class="screen" id="dataartsstudio_01_7523__screen1712131244513">#{DateUtil.getDay(Job.planTime) == 7 ? "true" : "false"}</pre>
</li></ol>
</div>
<div class="section" id="dataartsstudio_01_7523__section20721666465"><a name="dataartsstudio_01_7523__section20721666465"></a><a name="section20721666465"></a><h4 class="sectiontitle">Method 2</h4><ol id="dataartsstudio_01_7523__ol107192552463"><li id="dataartsstudio_01_7523__li203781243286">In the left navigation pane of DataArts Factory, choose <span class="menucascade" id="dataartsstudio_01_7523__en-us_topic_0181491853_en-us_topic_0099797006_menucascade12634646125010_1"><b><span class="uicontrol" id="dataartsstudio_01_7523__en-us_topic_0181491853_en-us_topic_0099797006_uicontrol1063494615015_1">Development</span></b> &gt; <b><span class="uicontrol" id="dataartsstudio_01_7523__en-us_topic_0181491853_en-us_topic_0099797006_uicontrol14634104655019_1"><span id="dataartsstudio_01_7523__en-us_topic_0181491853_en-us_topic_0099797006_text126341046105013_1">Develop Job</span></span></b></span>.</li><li id="dataartsstudio_01_7523__li871965518462">Click <span class="uicontrol" id="dataartsstudio_01_7523__uicontrol1387014328587"><b>Scheduling Setup</b></span> on the right of the job canvas.</li><li id="dataartsstudio_01_7523__li3958101410486">Set <strong id="dataartsstudio_01_7523__b141159994511">Scheduling Type</strong> to <strong id="dataartsstudio_01_7523__b25631028164520">Run periodically</strong>, <strong id="dataartsstudio_01_7523__b175911466453">Scheduling Frequency</strong> to <strong id="dataartsstudio_01_7523__b649310111462">Every month</strong>, and <strong id="dataartsstudio_01_7523__b955017485460">Select Time</strong> to <strong id="dataartsstudio_01_7523__b18210185819476">the last day of each month</strong>.<div class="fignone" id="dataartsstudio_01_7523__fig19770184210523"><span class="figcap"><b>Figure 4 </b>Setting the scheduling time to the last day of each month</span><br><span><img id="dataartsstudio_01_7523__image107711842155212" src="en-us_image_0000002234243352.png" title="Click to enlarge" class="imgResize"></span></div>
<p id="dataartsstudio_01_7523__p48462371527"></p>
<p id="dataartsstudio_01_7523__p12436122717531">After the scheduling time is configured, the job will be automatically executed on the last day of each month.</p>
</li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dataartsstudio_01_0520.html">Usage Guidance</a></div>
</div>
</div>
<script language="JavaScript">
<!--
initImageViewer('.imgResize');
var msg_imageMax = "view original image";
var msg_imageClose = "close";
//--></script>