Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to create a cron job

 
Vibhu sivam
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear ,

I have a struts application running in linux server. Please let me know how to run a cron job.Let me explain the scenario.
The users of the said application registers for the services for a particular time period. There is an expiry date for these members after which the users cannot login.
So on the expiry date , I want to set the users status as "In active" . The expiry date is already captured in the database(MySQL) . I thought of comparing this date with the current system date
and deactivate the members. Please let me know how to write and set a cron job for this. OR is there any better method to do this?

Request you help in this

Thanks
Vibhu
 
gurpeet singh
Ranch Hand
Posts: 924
1
Fedora Java Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vibhu sivam wrote:Dear ,

I have a struts application running in linux server. Please let me know how to run a cron job.Let me explain the scenario.
The users of the said application registers for the services for a particular time period. There is an expiry date for these members after which the users cannot login.
So on the expiry date , I want to set the users status as "In active" . The expiry date is already captured in the database(MySQL) . I thought of comparing this date with the current system date
and deactivate the members. Please let me know how to write and set a cron job for this. OR is there any better method to do this?

Request you help in this

Thanks
Vibhu


why can't you do this in your application itself
 
Karn Kumar
Ranch Hand
Posts: 153
Eclipse IDE Java Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

This might help you in some way..

http://www.coderanch.com/t/554494/gc/Cron-Expression-After-Every-days
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic