tags:

views:

74

answers:

5

Hi guys, is there any way i can make my records in the database to be automatic. e.g i want a message to be sent to helpdesk if a requested service is not attended within 24 hours, without clicking anything.

+2  A: 

technically it depends on the database you are using. if the database supports it, you could set up a scheduled job to scan the records and identify late services and email the helpdesk.

if the database doesn't support scheduled tasks then you could set up a client job on a timer to do the same thing.

A: 

This is what application software is for.

When the application saves to the database, the application also sends an email.

S.Lott
A: 

The traditional approach to this is to schedule a job (there are too many ways[1] to do that for me to go into details without knowing your server operating system, DBMS, and how much control you have to install or schedule programs on the server).

Your scheduled job would regularly check the database for records that have not been attended, and then take the appropriate action such as emailing the support team.

[1] Just so that this is not left completely unanswered; some DBMS (ex. SQL Server) have built in job scheduling facilities. You could run a Windows service on the server to do this. If not, you might consider running a Windows Service on one of your own servers to access the website (a great way to waste bandwidth).

Bernhard Hofmann
A: 

Use a scheduler like this one, found on rufus site. You could program it to run, for instance, every hour, and make it do the job without human interaction.

I am a Java shop myself and I've been using quartz. It is quite good and usable if you can adjust to jruby.

I've never liked database or operating system based solutions, since you might not control them and often get asked to run on different environments.

Marcelo Morales
A: 

Here's a very simple background job handler for Ruby:

codeforpeople.rubyforge.org/svn/bj/trunk/README

Easy to install and use. Fairly lightweight. It uses a SQL backend for managing concurrency. Runs on multiple machines simultaneously if you need it to.

science