Hi jw we use the open source quartz scheduling functionality:
http://www.opensymphony.com/quartz/ you define jobs similiar to the syntax of a cronjob. to use it a small example: private SchedulerFactory schedulerFactory = new StdSchedulerFactory(); private Scheduler scheduler = schedulerFactory.getScheduler(); scheduler.start(); and then: JobDetail jobDetail = new JobDetail("DocumentCleanJob", Scheduler.DEFAULT_GROUP, DocumentCleanJob.class); CronTrigger cronTrigger = new CronTrigger("DocumentCleanJob", Scheduler.DEFAULT_GROUP, "DocumentCleanJob", Scheduler.DEFAULT_GROUP, "0 0 6/12 * * ?"); scheduler.scheduleJob(jobDetail, cronTrigger); The only issues we had with webobjects are to bring the quarz.properties file into the classpath and also the consequence that if you have multiple instances you will also have multiple schedulers ... oliver On 5/9/07, Johann Werner <[EMAIL PROTECTED]> wrote:
I recently looked at the NSTimer documentation where a note came up stating that it is obsolete and should not be used for new development. Unfortunately there is no mention of alternatives. I have a WO app running that should execute a function at certain dates automagically ;) More precisely: people can register for an event and put in different information. At a certain date (to make sense a couple of days ahead of the event) the app should check if all mandatory information has been entered and sends a reminder email to that person if not. By searching the web the only way if found to implement such behaviour is using a cronjob with wget and a direct action. But by this the app loses control of when the action gets called as it is hardcoded. Additionally I would have to add this call manually in a system config file. I think that's no good as it is not directly related to the app and therefore adds to the install/maintenance complexitiy. What is the common practice to implement such timing needs? jw _______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/oliver.egger%40gmail.com This email sent to [EMAIL PROTECTED]
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
