具有特定时间的mysql事件

发布于 2024-12-21 14:53:12 字数 277 浏览 2 评论 0原文

我正在使用托管公司的 mysql。他们给了我 50 MB 最大存储空间用于 mysql。我的 mysql 中有一个表增长得非常快。如果我以不同的格式将此表保存到我的服务器并清理表中的新条目,我不会遇到任何存储问题。

我的问题是,有没有办法为服务器设置超时?我的意思是,如果服务器有一种方法可以在特定时间启动某个功能。

假设我希望我的服务器在 2012 年 1 月 15 日启动一项功能。我可以这样做吗?就像有没有办法设置服务器来启动我的功能?我可以编写一个 php 函数来保存我的 mysql 表并清理它吗?

I'm using mysql from a hosting company. They give me 50 mb max storage for mysql. And There is a table which grows very fast in my mysql. If I save this table in different format to my server and clean my table for new entries I don't have any storage problems.

My question is, is there a way to set a timeout for server to do it? I mean like if there is a way from server to start a function on a specific time.

Let's say I want my server to start a function at 01.15.2012.. Can I do that? Like is there a way to set server to start my function? and can I write a php function to save my mysql table and clean it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

怪异←思 2024-12-28 14:53:12

如果它是 Linux 服务器,您可以使用 cron。编写 php 脚本,然后设置 cron 进程以在特定时间执行该脚本。

If it's a Linux server you can use cron. Write your php script, then set up the cron process to execute the script at a particular time.

兲鉂ぱ嘚淚 2024-12-28 14:53:12

您可以使用MySQL事件来运行脚本或调用存储的功能。

You can use MySQL events to run a script or to call stored function.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文