[Tutor] Running Python Scripts at same time

David bouncingcats at gmail.com
Fri Jun 26 21:35:57 EDT 2020


On Sat, 27 Jun 2020 at 00:32, John Weller <john at johnweller.co.uk> wrote:

I have a Python program which will be running 24/7 (I hope 😊).  It is
> generating data in a file which I want to clean up overnight.  The way I am
> looking at doing it is to run a separate program as a Cron job at midnight
> – will that work?  The alternative is to add it to the loop and check for
> the time.
>

Hi, can you more fully describe the complete situation? I just have a hunch
that you haven't given enough information to generate very helpful replies.

How much data is involved? How quickly does it accumulate? Why do you want
to clean it "overnight", does it go to sleep? What is the hardware and OS
platform?

Also, can you explain why you believe that whatever "cleaning" you need
must be done by a separate program? Because that is a rather important
design decision with many consequences.

I guess you have your reasons, but you haven't shared them or the big
picture with us. Without that information, this reads like a classic "XY"
question: https://en.wikipedia.org/wiki/XY_problem

The problem with that kind of question is that it restricts the ability of
people to assist you.

I suggest that if you give the bigger picture then that will increase the
scope for people here to offer educational and useful replies, the reason
why the *tutor* list exists.

> I have tried researching this but only got even more confused.

People here are pretty good at offering great guidance, if you describe the
problem fully. Try not to narrow the solution space because of your own
confusion.

I write this advice from the perspective of someone who mostly reads this
list to learn. In this case I don't expect to have any answers, but I hope
that if you describe what you are doing more completely, then that will
create an opportunity for others to share their expertise in Python or data
acquisition or concurrent processing or whatever else with all of us.


More information about the Tutor mailing list