Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script ending after 2 - 3 hours. #1

sethcottle opened this issue Sep 15, 2018 · 0 comments

Script ending after 2 - 3 hours. #1

sethcottle opened this issue Sep 15, 2018 · 0 comments


Copy link

@sethcottle sethcottle commented Sep 15, 2018

The script is automatically ending itself every 2 to 3 hours, taking the bot offline. I haven't explored the issue at all, I immediately created a Cron job using:

* 1 * * * nohup python3 -u ~/fenrirbot/ &

What's this Cron job do?
This executes nohup python3 -u ~/fenrirbot/ & every hour to prevent the bot from going offline. This is my temporary work around until I take the time to look into the issue because programming, yeeyyyy.

Why are you including nohup?
I'm using Termius to remotely access my Raspberry Pi, this will ignore the hangup signal so the script doesn't terminate once I close my SSH connection.

What's the & for?
Runs the script in the background so you can still access the terminal.

Kill the task
Since I'm running the task as a background task, you can use $ ps aux | grep python3 to find the PID and then run $ sudo kill -9 TASK_PID.

@sethcottle sethcottle added the bug label Sep 15, 2018
@sethcottle sethcottle self-assigned this Sep 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant