如何在 azure linux 托管的 webapp 上运行 cronjobs?

编程入门 行业动态 更新时间:2024-10-23 22:28:09
本文介绍了如何在 azure linux 托管的 webapp 上运行 cronjobs?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 azure 上的 Linux 网络应用程序上找不到 Crontab 命令,我正在尝试为 Laravel 应用程序安排一个 cronjob.

Crontab command not found on Linux web app on azure,I'm trying to schedule a cronjob for a laravel application.

我正在尝试为我的 laravel 网络应用程序运行一个 cronjob.在线解决方案建议我为此使用 webjobs,在我的情况下它是模糊的,技术人员告诉我这是因为这是一个 Linux 网络应用程序,然后我必须使用 crontab 运行 cronjobs.我做到了,但偶尔我会收到-bash crontab: command not found",这表明整个配置不知何故丢失了.

I'm trying to run a cronjob for my laravel web app.The solutions online suggest that I use webjobs for this, in my case it is blurred out, the reason for this I was told by the technician that it is because it's a Linux web app, I then have to run cronjobs using crontab. which I did, but once in a while I get "-bash crontab: command not found" which suggest that the whole configuration gets lost somehow.

推荐答案

你需要创建一个包含你想要运行的所有命令的 bash 脚本.然后在配置中将其称为启动脚本.

you need to create a bash script includes all the commands you want to run. then you refer to this in the configuration as a startup script.

应该可以

这篇关于如何在 azure linux 托管的 webapp 上运行 cronjobs?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-03-27 04:30:47,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/678931.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何在   azure   linux   webapp   cronjobs

发布评论

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

>www.elefans.com

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