• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Send Monthly News letters to registered Users

 
swati mittal
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 164
Android Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We can done this by using cron job.
 
swati mittal
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 164
Android Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 164
Android Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The bellow code will help you.

Example
give your functionality bellow run method will run at the specified time.
 
swati mittal
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Moojid Hamid
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As an aside, Quartz is a popular open source scheduler written in Java.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic