rothnd wrote:
If you look at that first kometa plist I posted. That's what's not working for me at the moment.
Of course not. As I said, it was always wrong. It would never have worked.
Both of these scripts have 'schedulers' so in theory the script is always running (start, login, etc) so that when the bell tolls it does its thing. I've been sorely confused on scheduling since I was just starting to use cron like last year
I'm not sure what you mean by "scheduler" in this context. It's simply too general of a word. But it definitely sounds like you are talking about two completely different and unrelated types of "schedulers".
If these Python scripts need to be always running, then cron is not appropriate. They should be launched at system start time instead. System start time typically involves system facilities, the root user, or, even better, an unprivileged, dedicated user. But these are advanced topics to it's better to start with a task that runs when a user beings a login session. Once you have that part working a normal user context, then you could move it if you wanted to.
The cron architecture is designed to run scripts on your local machine according to a given schedule. Maybe you want to run something every day at midnight, the 4th Thursday of each month, or every 17 seconds.
then it recently stopped working
Why is that? That's a rhetorical question, of course. What I mean is that you've technically over-extended yourself. There is a fancy term for it called "technical debt". Just like financial debt, the only solution is to pay it off. You can't fix it with additional debt.
these people routinely do stuff like that for tutorials and I'm left trying to decipher.
Don't bother. The internet is fake. They're simply lying to you. This was something you could have done a few years ago. But these days, it isn't possible. There is some legitimate content available, but only those who already know these technical details can identify what is fake and what is legitimate. And most of those people could probably do the given task themselves. It's a tricky thing, navigating disinformation in the modern world.
Basically, these 'projects' get confined to their own directories. I point Terminal at that directory. Create a python virtual environment for isolation. And run the scripts. One problem I'm having is in these virtual environments. source activate...do stuff....deactivate. But when I'm 'activated' in a Terminal session the Terminal won't release until deactivate. I'm trying to reconcile this 'release/deactivate' with a script running on a schedule needing to be 'always available'.
The confusion and misinformation builds upon each other.
The first thing to understand is that Terminal really has nothing to do with scripting. Terminal is an interactive command line environment. Scripting is a non-interactive environment. Probably their only real similarity with each other is that they both facilitate command-line program execution with arguments, as opposed to double-clicking an object in the Finder. Other than that one specific aspect, the only commonality they share is social - a community of practice. People who use one, tend to also use the other.
There is never any need to "deactivate" anything. That's simply an artifact of the "source" command when run in Terminal. It's normal for a script or executable to require very specific environment settings like PATH, etc. Normally a script would setup what it needs, and then run the desired command. When the command completes, the entire modified environment goes away. There's no need for it anymore.
But I would like to learn.
That's good then. Just remember that not everyone is honest. And dishonesty thrives on the internet. There are no laws, so anything goes. Now, with modern AI systems, they can generate these fake tutorials in seconds. They look correct. In many cases they may be 90% correct. But you can only learn by doing yourself.
Ideally, a structured, human-led, interactive, learn-by-doing practice is best. The material is structured so that it is always just a little bit more difficult than you can handle. That way, you don't get lost and you don't get bored. Back in my day, we used to call these things schools, colleges, and universities.
...to be continued...