如何在特定日期和时间启动Mysql触发器

编程入门 行业动态 更新时间:2024-10-25 02:27:24
本文介绍了如何在特定日期和时间启动Mysql触发器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我必须在每个月底调用一个商店程序,我只需要知道如何在特定的日期和时间触发触发器来调用我的存储过程。

$ b $谢谢你的时间。

解决方案

MySQL不能这样做。相反,您应该使用 cronjob 。如果您使用的是Linux系统,则可以创建运行存储过程的脚本或程序,并使用 crontab 命令进行安排。

在命令行中,编写 crontab -e 将允许您编辑您的cronjobs。在这里,您可以添加

0 5 L *? * /path/to/script.pl

这将运行 / path /到/ script.pl 在上午5点,每个月的最后一天。

I have to call a store procedure at the end of each month, i just need to know how to fire a trigger on an specific date and time to call my stored procedure.

Thanks for your time.

解决方案

MySQL can't do this. Instead, you should use a cronjob. If you're on a Linux system, you can create a script or program that runs your stored procedure and schedule it for execution using the crontab command.

In the command line, writing crontab -e will allow you to edit your cronjobs. In here, you can add

0 5 L * ? * /path/to/script.pl

This will run /path/to/script.pl at 5 AM, the last day of every month.

更多推荐

如何在特定日期和时间启动Mysql触发器

本文发布于:2023-11-27 08:38:39,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1637317.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:触发器   日期   时间   如何在   Mysql

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!