EDIT: after reading the other solutions in this thread I'm blown away by how much people are over thinking and over engineering this. KISS people.
EDIT: after reading the other solutions in this thread I'm blown away by how much people are over thinking and over engineering this. KISS people.
Your solutions costs $240/year.
There are solutions out there that would probably bring that under $20/year, and be more reliable than your VM that falls over when it's full of logs (at some indeterminate future date).
10x+ savings with greater reliability isn't "overthinking it", it's a greatly improved solution.
If this is an issue, I think all other solutions have similar risks: account banned, company acquired/closed down, forced update to new API/system, to a point that I think I'd take the bet on a VM living longer in most cases
I have a VM from those lowendbox providers from a few years ago that costs $4 a YEAR - static IP, 256MB RAM/512MB virtual, 10GB storage, U18.04
I do not use it for anything serious, but it actually has had 99.9% uptime.
Again, with cheap providers there is a good chance they go belly up but for cronjob that should suffice.
For more serious cronjobs on the budget Hetzner is nice.
Many of the other options listed in this thread are free or within a rounding error of free. Some of them equally are not the "cheapest, easiest" because they're complex. But some of them pretty clearly meet both criteria (GitHub Actions comes to mind), and some of them might meet the criteria depending on what somebody has familiarity with (if you're already used to deploying code to any FaaS provider with a free tier, that'll likely be the cheapest/easiest way).
If you have a VPS, I agree, adding a cronjob to it is both cheap and easy. But it's silly to assume that anybody who is a geek has a VPS already.
However, to your point on KISS, it's not really about that. Leaving a server on 24/7 is pretty cost ineffective if all you want to do is run a short job once a day.
These are just the "reputable" places, there's tons of small players where you can get a tiny VM for $10 for a year.
And a few funsies "droplets" for that much that host my resume and other low volume, but open to internet, sites.
They all run cron.
Works great.