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

weird issues with cron #37

Closed
nxvash opened this issue Apr 5, 2022 · 5 comments
Closed

weird issues with cron #37

nxvash opened this issue Apr 5, 2022 · 5 comments

Comments

@nxvash
Copy link

nxvash commented Apr 5, 2022

I have this set up on a ubuntu 21.10 server and it works great when I run it manually. It changes remote.domain.com to my public ip address almost instantly. I make a copy of the script and set it to change test.domain.com in a cron task running every minute. Doing a grep CRON /var/log/syslog shows it as running but nothing ever gets updated on the cloudflare side. It still just shows 8.8.8.8. Any thoughts? I am about to pull my hair out lol.

@EntenKoeniq-OLD
Copy link

Same problem... only the first script i created works with and without cron...

The first script i created works with no problems but the second one doesn't update anything

IT WORKS:
*/1 * * * * /bin/bash ~/cloudflare-ddns-updater/scripts/home.sh
./home.sh

IT DOESN'T WORK (home.sh only works):
*/1 * * * * /bin/bash ~/cloudflare-ddns-updater/scripts/home.sh */1 * * * * /bin/bash ~/cloudflare-ddns-updater/scripts/home2.sh
*/1 * * * * /bin/bash ~/cloudflare-ddns-updater/scripts/home.sh && /bin/bash ~/cloudflare-ddns-updater/scripts/home2.sh
*/1 * * * * /bin/bash ~/cloudflare-ddns-updater/scripts/home.sh && sleep 3 && /bin/bash ~/cloudflare-ddns-updater/scripts/home2.sh
./home2.sh

@nxvash
Copy link
Author

nxvash commented Apr 5, 2022

I figured out my issue. I am running this on a ubuntu server VM on my homelab and not a rpi. Had a friend do a sanity check and he had me remove /bin/bash and try it again. After that it works like a charm. Are you running this on a rpi or a actual linux server?

@EntenKoeniq-OLD
Copy link

I figured out my issue. I am running this on a ubuntu server VM on my homelab and not a rpi. Had a friend do a sanity check and he had me remove /bin/bash and try it again. After that it works like a charm. Are you running this on a rpi or a actual linux server?

on a linux server

@nxvash
Copy link
Author

nxvash commented Apr 5, 2022 via email

@EntenKoeniq-OLD
Copy link

Try removing /bin/bash from cron and see if that works for you. That's what fixed my issue.

On Tue, Apr 5, 2022, 14:45 Nick-I. A. @.> wrote: I figured out my issue. I am running this on a ubuntu server VM on my homelab and not a rpi. Had a friend do a sanity check and he had me remove /bin/bash and try it again. After that it works like a charm. Are you running this on a rpi or a actual linux server? on a linux server — Reply to this email directly, view it on GitHub <#37 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGMDN3MIRC6WTSTXISBDYSTVDSC3LANCNFSM5STQ66NA . You are receiving this because you authored the thread.Message ID: @.>

i'll try it later. thank you

@nxvash nxvash closed this as completed Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants