Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to restart invidious on a cron? #62

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

Disregard. I'm an idiot. I had a typo in the cron.

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

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 restart just to be sure.

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

AltStyle によって変換されたページ (->オリジナル) /