[Python] Infinite loop or cron job every minute? [closed]

Discussão em 'Python' iniciado por Stack, Julho 7, 2025.

  1. Stack

    Stack Membro Participativo

    I am new to embedded programming and wrote a small python script that verifies a data recovered from a sensor connected to my PLC. The data has to be checked regularly because it should alert me if it exceeds a specific treshold.

    Question : is it more optimal to have a while true loop in the script + time.sleep(60) & run it at startup or planity to execute the script every minute via cron

    what are the benefits/disadvantages of each methods ?

    thanks for your help

    Continue reading...

Compartilhe esta Página