Skip to content

How to restart invidious on a cron? #62

Answered by tmiland
Incognify asked this question in Q&A
Discussion options

You must be logged in to vote

Hey,

I'm using this for restarting Invidious:

* * * * * curl -o /dev/null -s -m 10 http://169.254.169.254/metadata/v1/interfaces/private/0/ipv4/address:3000 || systemctl restart invidious
* * * * * sleep 30 && curl -o /dev/null -s -m 10 http://169.254.169.254/metadata/v1/interfaces/private/0/ipv4/address:3000 || systemctl restart invidious
@hourly systemctl restart invidious

This is for a DigitalOcean droplet, where http://169.254.169.254/metadata/v1/interfaces/private/0/ipv4/address:3000 are for the private IP address. The second one with a 30 sec. delay, so it'll run every minute, or each every 30 seconds.

So if curl is failing on ip:port, it'll restart the service.

And one for hourly r…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tmiland
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants