如何创建一个Cron作业来生成报告并为该报告编写SQL查询?

发布于 2025-01-29 07:50:22 字数 75 浏览 3 评论 0原文

我想生成一个报告,我已经准备就绪SQL查询,但是我被要求使用Cron Job,并且我的知识限制了,因此我如何将查询集成到Cron表达式中

i wanna generate a report and i have the SQL query ready but i was asked to use Cron Job and my knowledge is limited on it , so how can i integrate my query in the Cron expression

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

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

发布评论

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

评论(1

眼角的笑意。 2025-02-05 07:50:22

晚安

将其放在Linux Cron中看起来像这样:
在Linux提示符下运行crontab -e命令。

crontab -u用户-e

  • 输入命令要执行
    例子:
    su -postgres -c'psql -u用户-at database_name -h ip_address -p port -c“ query”'

good night

Putting it in linux cron would look like this:
Run the crontab -e command at the linux prompt.

crontab -u user -e

  • Enter command to be executed
    Example:
    su - postgres -c 'psql -U user -At database_name -h ip_address -p port -c "query"'
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文