How can I run my tasks at system startup? #184
Replies: 2 comments
-
Hi, New to python and rocketry, but it seems as though its perfect for what I need. Hijacking this thread as it turns out I have the same question and cant seem to find the answer anywhere. I have a dedicated box that I run python on, and pycharm for coding, though I am concerned that the windows box could go down with a power cut or need to reboot for some reason (eg windows update). How do I ensure that rocketry is running/rebooted as long as the box is on? The only thing I can currently think of is putting the script in windows task scheduler? I feel like this is the same question/conclusion that OP has Thanks! |
Beta Was this translation helpful? Give feedback.
-
I have done something like this using docker. Create a .Dockerfile FROM python:3.11-slim
COPY requirements.txt /requirements.txt
RUN pip install -r /requirements.txt && rm -f /requirements.txt
COPY src /app/src
WORKDIR /app
ENTRYPOINT ["python3", "-u", "-m", "src.main"] then create a docker-compose.yml version: "3"
services:
web:
restart: always
build:
context: .
dockerfile: Dockerfile
env_file:
- ./.env
volumes:
- .:/app Then run the container using |
Beta Was this translation helpful? Give feedback.
-
Hello, I'm having some problems on this subject.
I've read the documentation but I still don't understand how Rocketry stays alive on the system to run the scheduled tasks.
I've scheduled some tasks to run on specific days of the week, but these tasks are only executed if I run the script manually, to get around this problem I had to rely on crontab, which makes no sense to me.
So I want to get this clarified, is there a way to get Rocketry to run as soon as my system is started or do I have to use another tool like crontab?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions