Tue Jul 05, 2022 3:11 pm
Login Register Lost Password? Contact Us

Please Note: The HPCC Systems forums are moving to Stack Overflow. We invite you to post your questions on Stack Overflow utilizing the tag hpcc-ecl (https://stackoverflow.com/search?tab=newest&q=hpcc-ecl). This legacy forum will be active and monitored during our transition to Stack Overflow but will become read only beginning September 1, 2022.



添加定时任务举例

这个论坛用于上传各种ECL/HPCC相关的问题及答复

Thu May 14, 2020 3:30 am Change Time Zone

我改写了官方文档中定时任务的例子,供大家参考:
Code: Select all

IMPORT TutorialYourName;
task := FUNCTION
  RETURN BUILDINDEX(TutorialYourName.IDX_PeopleByZIP,OVERWRITE);
END;
events := MODULE
  EXPORT dailyAtMidnight := CRON(‘0 0 * * *‘);
  EXPORT dailyAtMinute(INTEGER minute=0) := EVENT(‘CRON‘,(STRING)minute + ‘ * * * *‘);
  EXPORT dailyAt( INTEGER hour,INTEGER minute=0) := EVENT(‘CRON‘,(STRING)minute + ‘ ‘ + (STRING)hour + ‘ * * *‘);
  EXPORT dailyAtMidday := dailyAt(12, 0);
  EXPORT EveryThreeHours := CRON(‘0 0-23/3 * * *‘);
END;
task : WHEN(events.dailyAtMinute(36));

这个例子提交后,会出现在事件计划列表中。
hellowangzhi
 
Posts: 17
Joined: Wed Jul 04, 2018 1:29 am

Return to 中文 (Chinese)

Who is online

Users browsing this forum: No registered users and 1 guest