Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

How to create a cron job

 
Greenhorn
Posts: 3
  • 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
 
Ranch Hand
Posts: 924
1
Netbeans IDE Fedora Java
  • 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
 
Ranch Hand
Posts: 153
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

This might help you in some way..

https://coderanch.com/t/554494/gc/Cron-Expression-After-Every-days
 
If you look closely at this tiny ad, you will see five bicycles and a naked woman:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic