您如何在退出 ssh 时保持您的气流调度程序在 AWS EC2 中运行? [英] How do you keep your airflow scheduler running in AWS EC2 while exiting ssh?

查看:13
本文介绍了您如何在退出 ssh 时保持您的气流调度程序在 AWS EC2 中运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Airflow 并将我的气流项目放在 EC2 中.但是,当我的 mac 进入睡眠状态或退出 ssh 时,如何保持气流调度程序运行?

Hi I'm using Airflow and put my airflow project in EC2. However, how would one keep the airflow scheduler running while my mac goes sleep or exiting ssh?

推荐答案

我使用 nohup 来保持调度程序运行并将输出重定向到日志文件,如下所示:

I use nohup to keep the scheduler running and redirect the output to a log file like so:

nohup airflow scheduler >> ${AIRFLOW_HOME}/logs/scheduler.log 2>&1 &

注意:假设您在 EC2 实例上而不是在笔记本电脑上运行此处的调度程序.

Note: Assuming you are running the scheduler here on your EC2 instance and not on your laptop.

这篇关于您如何在退出 ssh 时保持您的气流调度程序在 AWS EC2 中运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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