Category: Dev Chat
-
Show a simple example of a fastapi route that returns a simple value, or responds with an error. Be sure to use best practices…
john: Show a simple example of a fastapi route that returns a simple value, or responds with an error. Be sure to use best practices with the response. I want to learn how to return a response correctly from a route. Chatbot: Of course! When writing FastAPI routes, the most robust way to return responses…
-
I need to convert a crontab entry to a systemd timer
john: I have a crontab entry that executes a shell script every 30 minutes. It passes a parameter to th script. I need to convert it to be a systemd timer. My crontab entry is: */30 * * * * /Users/jturman/development/john/fastapi/cron.sh sandbox >> /Users/jturman/development/john/fastapi/python-cron.log 2>&1 Chatbot: To convert your cron job to a systemd timer,…