{"id":137,"date":"2008-05-22T17:35:09","date_gmt":"2008-05-22T08:35:09","guid":{"rendered":"http:\/\/www.climb.co.jp\/blog_espress\/archives\/137"},"modified":"2011-12-20T14:40:13","modified_gmt":"2011-12-20T05:40:13","slug":"scheduler%e3%80%90java%e5%af%be%e5%bf%9c%e3%83%ac%e3%83%9d%e3%83%bc%e3%83%88%e3%83%bb%e5%b8%b3%e7%a5%a8%e3%83%84%e3%83%bc%e3%83%abespressreport%e3%80%91","status":"publish","type":"post","link":"https:\/\/www.climb.co.jp\/blog_espress\/archives\/137","title":{"rendered":"Scheduler\u3010Java\u5bfe\u5fdc\u30ec\u30dd\u30fc\u30c8\u30fb\u5e33\u7968\u30c4\u30fc\u30ebEspressReport\u3011"},"content":{"rendered":"<p><img decoding=\"async\" src=\"\/\/www.climb.co.jp\/blog_espress\/wp-content\/uploads\/2011\/12\/32eb0555e88e02586b9e99e27466cbb4[1].jpg\" alt=\"\" \/><\/p>\n<p>EspressReport\u306b\u306f\u30e6\u30fc\u30b6\u304c\u30ec\u30dd\u30fc\u30c8\uff08\u5e33\u7968\uff09\u3068\u30d7\u30ed\u30bb\u30b9\u3092\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3067\u304d\u308b\u30b9\u30b1\u30b8\u30e5\u30fc\u30ea\u30f3\u30b0\u30fb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\uff08Scheduler\uff09\u3092\u542b\u3093\u3067\u3044\u3044\u307e\u3059\u3002\u305d\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3092\u4f7f\u7528\u3057\u3066\u30ec\u30dd\u30fc\u30c8\u30fb\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u304b\u3001\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067\u6642\u9593\u304b\u3001\u6642\u9593\u9593\u9694\u3067\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30ec\u30dd\u30fc\u30c8\u306f\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u306b\u30a8\u30ad\u30b9\u30dd\u30fc\u30c8\u304b\u3001\u96fb\u5b50\u30e1\u30fc\u30eb\u3067\u8ee2\u9001\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u306f\u5225\u3005\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u5024\u3068\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30ec\u30d9\u30eb\u3067\u8a2d\u5b9a\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>API\u3092\u4f7f\u7528\u3057\u3066\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306b\u63a5\u7d9a\u3055\u308c\u305f\u30d7\u30ea\u30f3\u30bf\u306b\u51fa\u529b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n\u30d8\u30eb\u30d7\u300cCharpter 13 Scheduler\u300d\u306eAPI\u30b5\u30f3\u30d7\u30eb\u3092\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u307e\u305fAPI\u3092\u4f7f\u7528\u3057\u3066\u30e6\u30fc\u30b6\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8PC\u306b\u63a5\u7d9a\u3055\u308c\u3066\u3044\u308b\u30d7\u30ea\u30f3\u30bf\u30fc\u306b\u51fa\u529b\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u3055\u3089\u306bAPI\u3092\u4f7f\u7528\u3057\u3066\u30e6\u30fc\u30b6\u304c\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u30fb\u30b8\u30e7\u30d6\u3092\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u30a2\u30af\u30bb\u30b9\u30fb\u5909\u66f4\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u30b3\u30fc\u30c9\u30b5\u30f3\u30d7\u30eb\uff1a\u30b9\u30b1\u30fc\u30b8\u30e5\u30fc\u30eb\u30b8\u30e7\u30d6\u306e\u4f5c\u6210<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>import java.io.*;<br \/>\nimport java.util.*;<br \/>\nimport quadbase.scheduler.*;<br \/>\nimport quadbase.reportdesigner.util.IExportConstants;<br \/>\npublic class MySchedule {<br \/>\npublic static void main(java.lang.String[] args) {<br \/>\ntry {<br \/>\nMySchedule ScheduleReport = new MySchedule();<br \/>\nScheduleReport.start();<br \/>\n} catch (Exception ex) {<br \/>\nex.printStackTrace();<br \/>\n}<br \/>\n}<br \/>\npublic void start() throws Exception {<br \/>\n\/\/ Create a schedule object to run a report template<br \/>\nScheduleObject sObj = new ScheduleObject(&#8220;SCH_OBJ1&#8221;, ScheduleObject.REPORTOBJ);<br \/>\n\/\/ Specify which template to use<br \/>\nsObj.setFileLocation(&#8220;Templates\/SAMPLE.rpt&#8221;);<br \/>\n\/\/ Specify the export format<br \/>\nsObj.setReportType(IExportConstants.DHTML);<br \/>\n\/\/ Specify the periodicity of the schedule (here run once) and start time<br \/>\nsObj.setTaskOption(ScheduleObject.ONE_TIME);<br \/>\nCalendar calendar = Calendar.getInstance();<br \/>\ncalendar.add(Calendar.MINUTE, 5);<br \/>\nsObj.setStartDate(calendar.getTimeInMillis());<br \/>\n\/\/ Don&#8217;t send email notification<br \/>\nsObj.setSendEmail(false);<br \/>\n\/\/ Add new schedule to jobs list<br \/>\nScheduleModifier.addScheduleTask(sObj);<br \/>\n}<br \/>\n}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>EspressReport\u306b\u306f\u30e6\u30fc\u30b6\u304c\u30ec\u30dd\u30fc\u30c8\uff08\u5e33\u7968\uff09\u3068\u30d7\u30ed\u30bb\u30b9\u3092\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3067 &hellip; <a href=\"https:\/\/www.climb.co.jp\/blog_espress\/archives\/137\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-137","post","type-post","status-publish","format-standard","hentry","category-espressreport"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.climb.co.jp\/blog_espress\/wp-json\/wp\/v2\/posts\/137","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.climb.co.jp\/blog_espress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.climb.co.jp\/blog_espress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.climb.co.jp\/blog_espress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.climb.co.jp\/blog_espress\/wp-json\/wp\/v2\/comments?post=137"}],"version-history":[{"count":1,"href":"https:\/\/www.climb.co.jp\/blog_espress\/wp-json\/wp\/v2\/posts\/137\/revisions"}],"predecessor-version":[{"id":419,"href":"https:\/\/www.climb.co.jp\/blog_espress\/wp-json\/wp\/v2\/posts\/137\/revisions\/419"}],"wp:attachment":[{"href":"https:\/\/www.climb.co.jp\/blog_espress\/wp-json\/wp\/v2\/media?parent=137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.climb.co.jp\/blog_espress\/wp-json\/wp\/v2\/categories?post=137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.climb.co.jp\/blog_espress\/wp-json\/wp\/v2\/tags?post=137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}