No worries. Thank you for the meticulously presented questions and information; they are a great rarity here.
For what it’s worth, I used Duck AI to help me understand some Python basics. I’ve no connection to them, other than using and enjoying their free service. Here is a snapshot of me arguing with a robot:
Hah. You’re welcome, and thank you for the compliment. Early in my career I did lots of technical writing on my blog. I always got annoyed at other people who would leave out details that were ambiguous, but for people who are learning you can’t take that for granted…especially with software. I also co-authored two software books, and getting those edited was a real eye-opener.
I was able to get the deployment resolved, and the site is up and running. So thanks again.
I have one more issue.
I can see that I have two machines, one cron and one web, and both appear to be running without issue. The cron job is set to fire every 5 minutes, and when it executes the Django command should be writing a log statement. At least it does so when I call the command directly.
OVERDUE_CHECKOUTS - Running overdue checkouts notifications. Found 4 records.
But I’m not seeing anything in my local terminal when I tail the logs with fly logs, and I’ve waited about 15-20 minutes, so I’d expect to see something. I’m also not seeing any errors when I view the logs on the Fly.io dashboard:
Machines > Machine Logs > Live Machine Logs.
The most recent entry just says “Configuring firecracker”.
What can I do in order to confirm the cron is running, and is able to hit my command?
Both machines should both be running permanently, with at least one instance. I can’t see anything in your TOML that would suspend your cron machine for underutilisation, but you don’t want that anyway; wake on request is fine for web servers, but not for schedulers.
In your local project directory (containing your fly.toml) you should be able to run flyctl machines list and see your machines. You should also be able to shell in via flyctl ssh console, though given this app is split into multiple machines, you probably will have to specify a machine id, in order to ensure you’re getting the cron one.
Yes, and unfortunately most people here struggle with Markdown. That’s odd, of course; we have a technical audience here, and Markdown was conceived specifically to be easy to work with.
So not only is getting the right details here like pulling teeth, but once some useful information has been obtained, it is of varying degrees of legibility.
I just got confirmation that the whole thing works! I set up some fixture data that contained checkouts that were overdue. The process fired right on time, and I got my notifications via SMS! I freaking love technology!
A final thought from me; it may be worth exploring the exposed web app for Suprcronic. I assume that if this is a control panel, it would require authentication, but it’s worth double-checking; it is now of course exposed to the public internet.
This app is for a small board game event I run every year, around 500 people will use it on a single day. And then not again for another year. So I’m not terribly concerned, other than academically…I want my app and code to be as good as I can make it.
I am not sure how to rephrase it. I am assuming Gunicorn is a Python-based web server within your Supercronic service. I am guessing that it is a dashboard or a control panel, and it is probably worth five minutes visiting that website, to ensure you’ve not left the front door unlocked. Make sure that changes to your crons are not possible without entering a password.