[Lift] Re: Two how-to questions

2009-11-05 Thread Derek Chen-Becker
I'm not sure how much complexity you want, but Quartz might be good for #1:

http://www.opensymphony.com/quartz/

Derek

On Mon, Nov 2, 2009 at 12:40 PM, Naftoli Gugenheim naftoli...@gmail.comwrote:


 Could someone give me a quick code sample to get me started on each of the
 following?
 1. A task that should run at a fixed time each day
 2. (If it's possible.) Errors logged should be emailed.
 Thanks!

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Two how-to questions

2009-11-05 Thread Naftoli Gugenheim

Hi. Thanks for responding.
I haven't looked it up, but I don't really need anything very specialized. I 
didn't mean that the time it runs each day has to be very precise. The point is 
just to back up the database daily.
Should I use java.util.Timer.scheduleAtFixedRate?

-
Derek Chen-Beckerdchenbec...@gmail.com wrote:

I'm not sure how much complexity you want, but Quartz might be good for #1:

http://www.opensymphony.com/quartz/

Derek

On Mon, Nov 2, 2009 at 12:40 PM, Naftoli Gugenheim naftoli...@gmail.comwrote:


 Could someone give me a quick code sample to get me started on each of the
 following?
 1. A task that should run at a fixed time each day
 2. (If it's possible.) Errors logged should be emailed.
 Thanks!

 




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Two how-to questions

2009-11-05 Thread Derek Chen-Becker
That would probably work in the simple case.

Derek

On Thu, Nov 5, 2009 at 3:19 PM, Naftoli Gugenheim naftoli...@gmail.comwrote:


 Hi. Thanks for responding.
 I haven't looked it up, but I don't really need anything very specialized.
 I didn't mean that the time it runs each day has to be very precise. The
 point is just to back up the database daily.
 Should I use java.util.Timer.scheduleAtFixedRate?

 -
 Derek Chen-Beckerdchenbec...@gmail.com wrote:

 I'm not sure how much complexity you want, but Quartz might be good for #1:

 http://www.opensymphony.com/quartz/

 Derek

 On Mon, Nov 2, 2009 at 12:40 PM, Naftoli Gugenheim naftoli...@gmail.com
 wrote:

 
  Could someone give me a quick code sample to get me started on each of
 the
  following?
  1. A task that should run at a fixed time each day
  2. (If it's possible.) Errors logged should be emailed.
  Thanks!
 
  
 



 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Two how-to questions

2009-11-02 Thread Jonathan Ferguson
The answer for two is add an email appender to your log4j configuration.
 Such as ::

appender name=email  class=org.apache.log4j.net.SMTPAppender
param name=BufferSize value=512 /
param name=SMTPHost value=127.0.0.1 /
param name=From value=myser...@mydomain.com /
param name=To value=myem...@mydomain.com /
param name=Subject value=OH NOES I HAS ERRAS /
layout class=org.apache.log4j.PatternLayout
param name=ConversionPattern
   value=[%d{ISO8601}]%n%n%-5p%n%n%c%n%n%m%n%n /
/layout
filter class=org.apache.log4j.varia.LevelRangeFilter
param name=LevelMin value=ERROR/
param name=LevelMax value=FATAL/
/filter
/appender


so the appender is used remember to add it :

root
priority value=INFO/
appender-ref ref=file/
appender-ref ref=email /
/root

Finding an example for 1.

2009/11/3 Naftoli Gugenheim naftoli...@gmail.com


 Could someone give me a quick code sample to get me started on each of the
 following?
 1. A task that should run at a fixed time each day
 2. (If it's possible.) Errors logged should be emailed.
 Thanks!

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---