I have a form with resources, when selected one clicked, blocked button in the end of form, it updates db with status as "Blocked" and current timing as BlockedTiming Then it waits for approval....My requirement is if that blocked status is not changed to "Approved" within 10 days of BlockedTiming, it should automatically change it to "Approved" on exactly when 10 days gets completed.
Now I have 2 options:
1) Is it possible to write DB Trigger for this, if yes then how ? how that trigger will be called
2) I am using struts2. So how can we write a action which gets called on login/server startup and checks the condition and takes appropriate action.
Kindly suggest.
write code to trigger dabase .schedule your task using
corn tab --> unix,
windows scheduler --> windows.