routines

Grails creating routines

我只是一个虾纸丫 提交于 2020-01-06 08:04:16
问题 Let's say, i have a specific information in the database that needs to be sent for a specific user by email in a specific time of the day. a) How can i create a routine in Grails, which is basically an action that is always running - without being associated with any event? Let's say, every hour that action is runned. I was thinking about something like this: while(true){ ... myCodeHere ... wait 30minutes } Will this actually work? Without too much processing? And how can i have an action

How to use mock object mimicing a daily routine program?

烂漫一生 提交于 2020-01-06 03:32:28
问题 My program has a daily routine, similar to an alarm clock event. Say, when it's 2pm(The time is the system time in my pc), do something for me. What I want to do is to speed up the testing period(I don't really want to wait 4 days looking at the daily routine and check errors.) I read on wiki of Mock object, the writer DID mention alarm clock program. I was so happy to see but still, don't know how to do it. I am new to Mock Object, and I am programming in Java. So JMock or EasyMock(or any

How to use Java classes in Talend

不羁岁月 提交于 2019-11-29 08:44:04
I have the following three classes : I tried making the routine of 1 & 2 and used tjava to call the main class and the method from 1 & 2 but I am unable to fetch those methods. 1) package page_scraper; import com.gargoylesoftware.htmlunit.Page; import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.WebClientOptions; import com.gargoylesoftware.htmlunit.html.FrameWindow; import com.gargoylesoftware.htmlunit.html.HtmlButtonInput; import com.gargoylesoftware.htmlunit.html.HtmlElement; import com.gargoylesoftware.htmlunit.html.HtmlOption; import com.gargoylesoftware

How to use Java classes in Talend

拟墨画扇 提交于 2019-11-28 02:15:28
问题 I have the following three classes : I tried making the routine of 1 & 2 and used tjava to call the main class and the method from 1 & 2 but I am unable to fetch those methods. 1) package page_scraper; import com.gargoylesoftware.htmlunit.Page; import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.WebClientOptions; import com.gargoylesoftware.htmlunit.html.FrameWindow; import com.gargoylesoftware.htmlunit.html.HtmlButtonInput; import com.gargoylesoftware