Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run by cron #69

Closed
wants to merge 8 commits into from
Closed

Conversation

MateoLostanlen
Copy link
Member

@MateoLostanlen MateoLostanlen commented Feb 13, 2022

This script allows to capture an image every 30s on the pi zero and send it to the central pi

For the moment it is launched in background using python3 /home/pi/pi_zeros/runner.py & but it is not very stable

I suggest to use a crontab instead which will launch a loop of two captures every minute:

*/1 * * * * python3 /home/pi/pi_zeros/runner.py --max_iteration 2

@MateoLostanlen MateoLostanlen added type: bug Something isn't working type: enhancement New feature or request labels Feb 13, 2022
@MateoLostanlen MateoLostanlen requested review from blenzi, fe51 and a team February 13, 2022 17:45
@MateoLostanlen MateoLostanlen self-assigned this Feb 13, 2022
Copy link
Member

@fe51 fe51 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks for the PR !

How did you spot the instability of the current process? In any case, the proposed approach via a crontab sounds good to me !

I have juste made some naming suggestion. If for variable naming suggestion, it is open to discussion (name might be too long now haha, or a comment to make it clear it is about seconds ?), I think it's good to specify the time unit in the parser desc.

@MateoLostanlen
Copy link
Member Author

Hi @fe51, thanks for your comments. Yes you are right it's better to specify time unit. I've made the change

I don't really know why the background task it's unstable but I notice that after a while the process stop :/

@MateoLostanlen MateoLostanlen requested a review from fe51 February 14, 2022 10:39
Copy link
Member

@fe51 fe51 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks fo the quick updates !

In fact, it occured to me that I had also seen on forums that it was perhaps not stable..
who knows why !
I do not know why, but as long as you've experienced that it's not stable, and regular short job cron runs seem to be more robust, let’s go for it !

@MateoLostanlen
Copy link
Member Author

I'm closing this PR, let's use #74 instead

@MateoLostanlen MateoLostanlen deleted the run_by_cron branch July 24, 2022 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants