• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Scheduler.

 
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Merrill and Other Ranchers Around ,

Merrill , Thanks for your suggestions and because of that things are moving pretty quite smoothly. Also the DTD which you had provided for the struts-config was really easy to learn. I dont know whether my question really fits in Struts or Any Web Architecture but still wanted help on this.

This time the project requirements demand that we make a Scheduler which automatically performs some operations for example sending an email to the customer after the order has been fulfilled. I know this is easily achievable using Windows Scheduled Tasks. But the requirement specification is that they want a Shell Script doing this. Also for this Unix Cron Jobs are useful. just wanted to know how or what command shall we write in that shell script which would call our java Program which fires the Mail. P.S : We are using JavaMail API for this.

Please help me with this.

Thanks in Advance and regards ,

Yogendra Joshi.
 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This may not fit your requirement but still sharing with all ranch people. we also needed to do few things on daily basis (may ne during night time) without any user interaction like a scheduler task.

We have decided to use Apache's "quartz" for this purpose.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you're using a J2EE Version 1.4 compliant application server, you could use the timer service defined in the specification. Essentially this involves writing a stateless session EJB and registering one of its methods with the timer service to fire at given times or intervals.

This article explains how to do it.

If you'd still rather go with a Cron job, it's just a matter of writing a shell scipt that calls:

java -cp xyz.jar;abc.jar MyClass
 
He's giving us the slip! Quick! Grab this tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic