wood burning stoves 2.0*
The moose likes Java in General and the fly likes Send Monthly News letters to registered Users Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Send Monthly News letters to registered Users" Watch "Send Monthly News letters to registered Users" New topic
Author

Send Monthly News letters to registered Users

swati mittal
Ranch Hand

Joined: Oct 21, 2008
Posts: 39
Hi,

I am going to make a program that will send the email to register user.
I just want to execute this program on monthly basis.
How it will be possible?
Vinoth Thirunavukarasu
Ranch Hand

Joined: Dec 18, 2008
Posts: 164

We can done this by using cron job.


Java Best Practices
Linux Best Practices
Amortization Calculator

swati mittal
Ranch Hand

Joined: Oct 21, 2008
Posts: 39
Vinoth Thirunavukarasu wrote:We can done this by using cron job.


but i am using linux environment and cron job works on linux.
Vinoth Thirunavukarasu
Ranch Hand

Joined: Dec 18, 2008
Posts: 164

swati mittal wrote:
Vinoth Thirunavukarasu wrote:We can done this by using cron job.


but i am using linux environment and cron job works on linux.

Ya cron jobs works on linux.
swati mittal
Ranch Hand

Joined: Oct 21, 2008
Posts: 39
Vinoth Thirunavukarasu wrote:
swati mittal wrote:
Vinoth Thirunavukarasu wrote:We can done this by using cron job.


but i am using linux environment and cron job works on linux.

Ya cron jobs works on linux.


sorry i want to say that i am using window environment.
Vinoth Thirunavukarasu
Ranch Hand

Joined: Dec 18, 2008
Posts: 164

The bellow code will help you.

Example
give your functionality bellow run method will run at the specified time.
swati mittal
Ranch Hand

Joined: Oct 21, 2008
Posts: 39
Vinoth Thirunavukarasu wrote:The bellow code will help you.

Example
give your functionality bellow run method will run at the specified time.


I am trying to run the example given by you.
but it is giving error --

The java class could not be loaded. java.lang.UnsupportedClassVersionError: Schedule (Unsupported major.minor version 49.0)


please help me how i can run the same program as it is.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41068
    
  43
Windows has a facility similar to cron called "Task Scheduler". It can execute a batch file that calls your Java code.

Alternatively, you can create a Windows Service that runs continuously as a background job; libraries like Java Service Wrapper help with that.


Ping & DNS - my free Android networking tools app
Moojid Hamid
Ranch Hand

Joined: Mar 07, 2009
Posts: 120
swati mittal wrote:
Vinoth Thirunavukarasu wrote:The bellow code will help you.

Example
give your functionality bellow run method will run at the specified time.


I am trying to run the example given by you.
but it is giving error --

The java class could not be loaded. java.lang.UnsupportedClassVersionError: Schedule (Unsupported major.minor version 49.0)


please help me how i can run the same program as it is.


It means you are running a java class file that was compiled with newer version of JDK. You need to upgrade to newer version to be able to run this code. If you are already running latest version check your PATH and JAVA_HOME environment variables.
swati mittal
Ranch Hand

Joined: Oct 21, 2008
Posts: 39
Moojid Hamid wrote:
swati mittal wrote:
Vinoth Thirunavukarasu wrote:The bellow code will help you.

Example
give your functionality bellow run method will run at the specified time.


I am trying to run the example given by you.
but it is giving error --

The java class could not be loaded. java.lang.UnsupportedClassVersionError: Schedule (Unsupported major.minor version 49.0)


please help me how i can run the same program as it is.


It means you are running a java class file that was compiled with newer version of JDK. You need to upgrade to newer version to be able to run this code. If you are already running latest version check your PATH and JAVA_HOME environment variables.



Thanks a lot......
I was using wrong jre libraries.
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

As an aside, Quartz is a popular open source scheduler written in Java.


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Send Monthly News letters to registered Users
 
Similar Threads
Required escalation(email) to be introduced with shopping site
Arrays
automail
connectivity between java and ms access
Javaranch journal