如何创建一个Cron作业来生成报告并为该报告编写SQL查询?
我想生成一个报告,我已经准备就绪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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
晚安
将其放在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
Example:
su - postgres -c 'psql -U user -At database_name -h ip_address -p port -c "query"'