But what about Rust? There are a lot of variants, but which one should I choose, maybe use some crate or std asset contain some methods for these needs?
Using std only, I guess you could try listening on a port, and use that as a "lock". Some people also use locks on files, but I don't think that's very reliable.
I think using OS semaphores is less bad than the other options.
hm.. now I think: do I really want crontab as maybe I can just run the app on background as the daemon and run update operations in the loop using timeout?
just not sure how is better to implement that, maybe like that:
I mean, you don't have to sleep, just queue all incoming operation requests and process them one by one, that fulfills your original question of not having more than one thing running concurrently.
In this case, I want just update some feed once per minute, so the sleep is really wanted here.
By using this solution I don't really want the crontab anymore as can operate the schedule inside the app, lol
Of course that's not an answer to the subject, but I'll use this my solution, by add the application into systemd list. Thanks, not sure about closing, let's maybe select your first reply as the solution.