如何在 azure linux 托管的 webapp 上运行 cronjobs? [英] How to run cronjobs on an azure linux hosted webapp?

查看:14
本文介绍了如何在 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆