如何自动生成我的数据库记录

时间:2022-06-28 01:23:46

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.

有什么方法可以让我在数据库中的记录是自动的。例如,如果请求的服务在24小时内没有出席,我希望将消息发送到服务台,而不点击任何内容。

5 个解决方案

#1


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.

如果数据库不支持计划任务,那么您可以在计时器上设置客户端作业以执行相同的操作。

#2


This is what application software is for.

这就是应用软件的用途。

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

当应用程序保存到数据库时,应用程序也会发送电子邮件。

#3


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).

传统的方法就是安排一份工作(有很多方法可以让我在不知道您的服务器操作系统,DBMS以及您需要安装或安排程序的控制的情况下详细了解详细信息。服务器)。

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).

[1]这样就不会完全没有答案;一些DBMS(例如SQL Server)内置了作业调度工具。您可以在服务器上运行Windows服务来执行此操作。如果没有,您可以考虑在自己的服务器上运行Windows服务来访问网站(浪费带宽的好方法)。

#4


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.

使用像rufus网站上找到的这样的调度程序。例如,您可以将其编程为每小时运行一次,并使其在没有人工干预的情况下完成工作。

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

我自己是一家Java商店,我一直在使用石英。如果你可以适应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.

我从来不喜欢基于数据库或操作系统的解决方案,因为您可能无法控制它们,并且经常被要求在不同的环境中运行。

#5


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

这是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.

容易安装,也容易使用。相当轻巧。它使用SQL后端来管理并发。如果需要,可以同时在多台机器上运行。

#1


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.

如果数据库不支持计划任务,那么您可以在计时器上设置客户端作业以执行相同的操作。

#2


This is what application software is for.

这就是应用软件的用途。

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

当应用程序保存到数据库时,应用程序也会发送电子邮件。

#3


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).

传统的方法就是安排一份工作(有很多方法可以让我在不知道您的服务器操作系统,DBMS以及您需要安装或安排程序的控制的情况下详细了解详细信息。服务器)。

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).

[1]这样就不会完全没有答案;一些DBMS(例如SQL Server)内置了作业调度工具。您可以在服务器上运行Windows服务来执行此操作。如果没有,您可以考虑在自己的服务器上运行Windows服务来访问网站(浪费带宽的好方法)。

#4


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.

使用像rufus网站上找到的这样的调度程序。例如,您可以将其编程为每小时运行一次,并使其在没有人工干预的情况下完成工作。

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

我自己是一家Java商店,我一直在使用石英。如果你可以适应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.

我从来不喜欢基于数据库或操作系统的解决方案,因为您可能无法控制它们,并且经常被要求在不同的环境中运行。

#5


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

这是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.

容易安装,也容易使用。相当轻巧。它使用SQL后端来管理并发。如果需要,可以同时在多台机器上运行。