schedule

Dynamic parameters for @Schedule method in an EJB 3.x

倾然丶 夕夏残阳落幕 提交于 2019-12-01 17:06:39
问题 I'm new to the @Schedule annotations in J2EE6 I want to run a job using EJB 3.x with Glassfish 3.1. The javax.ejb.Schedule seems to be a good choice for us, so we could think of our custom time as something like: @Singleton public class CustomTimer { @EJB SettingsFacade settingsFacade; @Schedule(second="someSecondParameter", minute="someMinuteParameter",hour="someHourParameter", persistent=false) public void executeTimer(){ //Code executing something against database using the settingsFacade

In Linux, schedule task to Hour, minute, second precision [duplicate]

↘锁芯ラ 提交于 2019-11-30 23:33:54
This question is an exact duplicate of: Linux task schedule to Hour, minute, second 1 answer I just want to run a shell scrip at say this exact time "16:22:36". utilities like "at" are useless since they don't have "seconds". "sleep" does not work since the loop is ending 8 hours ahead of time for some reason :s , I have searched all over google and couldn't find any tools. so a huge Os like Linux doesn't have a proper task scheduler? The standard cron lacks second precision scheduling because Unix server administration traditionally rarely needed one-second precision It might be used in such

Create a Scheduled service in android

↘锁芯ラ 提交于 2019-11-30 14:27:05
问题 I need to create a schedule service in android with java. I have tried some codes , but all time after build the application it doesn't run. My logic is simple , I want to make a service to check the existence of a file in the bluetooth folder path, If this file is there , so this service will run another application , I need this with a schedule which run every 2 minutes. Until now that's great, but now I have an error The method startActivity(Intent) is undefined for the type MyTimerTask .

Can the EJB 3.1 @Schedule be configured outside of the application code?

不羁岁月 提交于 2019-11-30 12:35:24
问题 How can I configure a schedule intervals: @Schedule(persistent=true, minute="*", second="*/5", hour="*") outside of the application code? How can I configure it in ejb-jar.xml? Can I configure it outside the application (kind of properties file)? 回答1: Here is an example of a scheduling in the deployment descriptor: <session> <ejb-name>MessageService</ejb-name> <local-bean/> <ejb-class>ejb.MessageService</ejb-class> <session-type>Stateless</session-type> <timer> <schedule> <second>0/18</second

Running a Java method at a set time each day

非 Y 不嫁゛ 提交于 2019-11-30 08:31:08
I'm relatively new to Java and I've pick up a project to work on. However, I've run into a block. I need a method to run at a certain times throughout the day. I've done quite a bit of searching but I can't find anything that seems like it would do the trick. I've run into the Timer class but it appears to run at certain intervals. The Scheduler class, appeared to have the same issue. I also came across Quartz but I think I need something more lightweight and I could only see how to do things at intervals. Perhaps, just because I'm new, I've missed some things that could help me in these

Have an EJB schedule tasks with “crontab syntax”

余生长醉 提交于 2019-11-30 07:23:54
I am trying to figure out the possibilities I have to solve the following problem. a) I want to have a database table that uses "crontab syntax" to schedule tasks, the structure would be something like this: |-Id-|---Crontab Syntax---|---------Task----------| | 1 | 30 * * * * * | MyClass.TaskA(args[]) | | 2 | 0 1 * * 1-5 * | MyClass.TaskB(args[]) | | | | | The above table will be modified at any time by an external application. Tasks added or removed should instantly affect the scheduler. b) The scheduler itself should reside on a Java application server. It should constantly be synched with

Can the EJB 3.1 @Schedule be configured outside of the application code?

穿精又带淫゛_ 提交于 2019-11-30 04:54:34
How can I configure a schedule intervals: @Schedule(persistent=true, minute="*", second="*/5", hour="*") outside of the application code? How can I configure it in ejb-jar.xml? Can I configure it outside the application (kind of properties file)? Here is an example of a scheduling in the deployment descriptor: <session> <ejb-name>MessageService</ejb-name> <local-bean/> <ejb-class>ejb.MessageService</ejb-class> <session-type>Stateless</session-type> <timer> <schedule> <second>0/18</second> <minute>*</minute> <hour>*</hour> </schedule> <timeout-method> <method-name>showMessage</method-name> <

Timer Service in ejb 3.1 - schedule calling timeout issue

安稳与你 提交于 2019-11-29 22:36:33
问题 I have created simple example with @Singleton, @Schedule and @Timeout annotations to try if they would solve my problem. The scenario is this: EJB calls 'check' function every 5 secconds, and if certain conditions are met it will create single action timer that would invoke some long running process in asynchronous fashion. (it's sort of queue implementation type of thing). It then continues to check, but while the long running process is there it won't start another one. Below is the code I

Primefaces Schedule is not displayed in Application

冷暖自知 提交于 2019-11-29 17:06:21
I got a problem with the Primefaces <p:schedule> . It is not displayed in my Application which uses <ui:include> and <ui:composition> Tags. But if I place the Schedule in a Standalone Page without these Tag Combination, it works as expected. My app.xhtml Page includes a Layout which is defined by the <p:Layout> Component. I define a Menu at the left side with a <f:ajax> Tag, so that a contentPanel get updated on each click in the menu. One of these Pages which gets included, is the hldyplanning.xhtml - in this Page a <p:schedule> should be displayed. For testing I create a new site. The test

WIX Installer Preserve config file On major upgrade early Scheduling

痴心易碎 提交于 2019-11-29 16:46:19
I am using Major upgrade early scheduling in my WIX Setup projects as below. I prefer to clear all files on upgrades. However I need to preserve a config file and restore again on upgrade. I don't want to change this early scheduling (Schedule="afterInstallInitialize"), as I will be ended with other issues. Is there any work around (Custom Actions?) to preserve the config file in the above early scheduling? The way I deal with this problem is to have two files. You'll notice that app.config/web.config files appSettings element has a file attribute. If you store your user data there the