Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


crontab -e problem -need advice
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

crontab -e problem -need advice

Hi,
im trying to put this command into crontab:
0 22 */10 * * * * */10 * * DOMAIN_NAME="mydomain.tld" \
EMAIL="[email protected]" \
DNS_PROVIDER="cloudflare" \
CLOUDFLARE_DNS_API_TOKEN="354f675ae5wf5r67fd6t7r5g65rg" \
./lego.sh

i cant save it.
Can anyone tell me how this should look like?

Comments

  • JabJabJabJab Member
    edited November 2023

    Because crontab is not shell. You can't split lines like that in crontab.

    Put those in script, put those in wrapper script calling lego.sh, put those as export X=Y, put those in environment

    also I have no idea if this is vanilla formatting or did you really put 0 22 */10 * * * * */10 * * command that many asterisk/stars/*? This is no go either.

    Thanked by 2raza19 gbzret4d
  • yoursunnyyoursunny Member, IPv6 Advocate

    Mentally strong people stay up all week and type the command when the time arrives.

    Exceptionally smart people use systemd timer units:
    https://wiki.archlinux.org/title/systemd/Timers
    https://www.freedesktop.org/software/systemd/man/latest/systemd.timer.html

    Thanked by 1davide
  • Please say that isn't your real cloudflare token.

    Thanked by 3emgh ipguru raza19
  • @ralf said:
    Please say that isn't your real cloudflare token.

    that isn't your real cloudflare token.

    Thanked by 1ralf
  • If you are using another DDNS service, you can also perform DDNS operations while applying Cloudflare by pointing the CNAME to the subdomain of that DDNS service.

    However, given recent trends, you may consider using Cloudflare Tunnels (Argo or cloudflared) instead of using PPPoE and NAT. If you were using nginx to proxy to change the port, this is no longer necessary.

  • davidedavide Member
    edited November 2023

    @yoursunny said:
    Exceptionally smart people use systemd timer units

    Ahah that's a good joke, smart people and systemd in one sentence! :D

    Here's another one, have fun!!

    $ cat /etc/apt/preferences.d/no_systemd
    Package: systemd
    Pin: release *
    Pin-Priority: -1
    
    Thanked by 11q1
  • Thats too many time/asterisk columns in crontab. (about 5 columns AFAIK)
    Instead put that ddns command into script exp: ~/.bin/lego.sh , if you need run every 10 minutes:
    */10 * * * * /home/(yourUserName)/.bin/lego.sh >/dev/null 2>&1 ## if you dont need email notification
    */10 * * * * /home/(yourUserName)/.bin/lego.sh >> /var/log/myddns.log 2>&1 ## if you need log
    as @balloon said, consider use Cloudflare Tunnels Argo, even it need some work (CF has good and easy documentation)

  • davidedavide Member
    edited November 2023

    A revolutionary fad due to become the next obsolete abandonware few years after its opening ceremony. That's Red Hat's ring to rule them all. And to sell training material. But for a user it's overhead administration. It all could be so simple without bloatware!

    Maybe I should drop computers and go back to magazines already. I'm fucking hating everything anyways.

    Thanked by 11q1
  • @davide said:
    A revolutionary fad due to become the next obsolete abandonware few years after its opening ceremony. That's Red Hat's ring to rule them all. And to sell training material. But for a user it's overhead administration. It all could be so simple without bloatware!

    Maybe I should drop computers and go back to magazines already. I'm fucking hating everything anyways.

    PS: I clocked a month with Falkon! All the web sucks!!

    ...time for my meds now.

  • become the next obsolete abandonware few years after its opening ceremony.

    since too lazy and skipped tech update, then I feel left behind :#

  • davidedavide Member
    edited November 2023

    @0xC7 said:

    become the next obsolete abandonware few years after its opening ceremony.

    since too lazy and skipped tech update, then I feel left behind :#

    If it were useful I'd gladly use it.

    Over.

  • @0xC7 said:
    since too lazy and skipped tech update, then I feel left behind :#

    I'll challenge you to name 1 (one) thing that I'm missing out with sysvinit. Legit curious.

  • balloonballoon Member
    edited November 2023

    @0xC7 said:

    if you need log

    as @balloon said, consider use Cloudflare Tunnels Argo, even it need some work (CF has good and easy documentation)

    This is a trend in Japan: In Japan, even individuals can subscribe to a 10Gbps broadband line. At this time, ISPs adopted IPoE instead of PPPoE because PPPoE caused traffic congestion and slowed communication speeds. For IPoE, NAT cannot be used. Therefore, in Japan, Cloudflare tunnels and Tailscale are increasingly being used instead of DDNS.
    Similar situations will occur in other countries in the future, so it will be useful for you to know about methods such as Cloudflare Tunnel and Tailscale. These can also be used for IPv4 access to an IPv6 only VPS and http access to a NAT VPS.

  • @davide said: thing that I'm missing out with sysvinit.

    nooo, no ofense. I came from Micro$$$ minded people (3.11 thru MS-Win8) ... still early learner of nix; that my last comment is #note for myself# no intend sarcasm to other.
    Start tasting linux with early version Tinycore with qemu or live-run with real-old-hardware, next trying was ready made liveCD - puppy,slitaz and some debian derivative distro (that x32,i386,i486), however still no success running gentoo/*bsd (also no opportunity digging MacOS)
    With live-run on hardware, learning /udev tweaks so external USB/serial/parallel devices can be detected, also making proper /etc/rc.X that service/daemons run smoothly.
    Last year, has small-lowend vps crashed .. newer OS template has default systemd (even it's debian derivative). Installing cron came with many package depedencies, found alternative with systemd.timer.
    and sometime (simple and powerful) /etc/init.d/service restart don't give intended result than systemctl service restart ; running logread displaying error and grep -i pattern /var/log/ can be achieved by journalctl .
    Honestly, I don't have anything missed out with SysVinit, since just a few nix-derivative I have been real-tested. Based on past experience (mostly Desktop/GUI version) nix-derivative may use combination OpenRC and SysVinit, but I might be wrong.
    So, my own conclusion for (always) having updated knowledge and keep practice (mostly with terminal/command-line interface) ... living between old-mature and new tech worlds.
    Again, my apologies for being off-topic and my english is not good.

  • davidedavide Member
    edited November 2023

    @0xC7 first punch in the guts that I got from this mad-hatter attitude to cyclically trash and replace good system components was Grub 2. Look at this Polaroid from my memory album: you see? This was 15 years ago, one fucking summer morning when I spent 5 hours learning everything about Grub (now Grub Legacy >:) ): the user manual, tutorials, boot command line, configuration, ... All of it, apart from the source code itself. That was my Grub (now Grub Legacy >:) ) morning.

    Than this shiny Grub 2 came about and trashed the totality of Grub's (now Grub Legacy >:) ) paradigms. That one morning of mine is now trash knowledge. NoOoOOoooOO :o
    (ok, one morning lost is not so bad...)

    But for what? >:)

    No fucking person in the whole LET forum knows how to configure Grub 2 from cfg files. Ok maybe a couple do. But a good paradigm was trashed by ecstatic schizophrenic imbeciles for no fucking reason. It is overengineered out of proportion, it's painful and complex to manage for those who do, and it's an irrelevant system component for most everybody else.

    Now I'd murder any happy new intern who refers to SystemShit™ or to this practice of trashing for the sole purpose of replacing instead of solving problems as "progress".

  • @emgh said:

    @ralf said:
    Please say that isn't your real cloudflare token.

    that isn't your real cloudflare token.

    Hehe try it ;)> @0xC7 said:

    Thats too many time/asterisk columns in crontab. (about 5 columns AFAIK)
    Instead put that ddns command into script exp: ~/.bin/lego.sh , if you need run every 10 minutes:
    */10 * * * * /home/(yourUserName)/.bin/lego.sh >/dev/null 2>&1 ## if you dont need email notification
    */10 * * * * /home/(yourUserName)/.bin/lego.sh >> /var/log/myddns.log 2>&1 ## if you need log
    as @balloon said, consider use Cloudflare Tunnels Argo, even it need some work (CF has good and easy documentation)

    i realised it today. I was too tired yesterday. I think i mixed 2 different formats together during my coma

Sign In or Register to comment.