Cron jobs, or the ability to call a function


I have some python code that I want to invoke a call (or an API endpoint in my code) or just call a python script every T time?

Replit Profile:

You can run some code on some interval using threads (python - Run certain code every n seconds - Stack Overflow)

import threading

def printit():
  threading.Timer(5.0, printit).start()
  print "Hello, World!"


Or if you want to run an entire script every t seconds you type this in the shell:
while sleep <t seconds here>; do python <path to script here>; done

(You can stop it by pressing ctrl+c)

Is that what you were looking for?

I guess that can work.

I need it to run every Friday, and I figured cron would be the easiest way to do it

Maybe make the repl only start on fridays and run its thing once each friday, then set up lots of cron jobs to send a request to it each Friday

GitHub Actions would be more suitable for this