h

    Hedgar

    6 months ago
    What's the best way to set up a cronjob in a local machine with prefect code within a virtual environment. Currently did
    pipenv shell prefect  agent local start
    inside a sh script which I hands over to crontab like this
    07 18 * * 1-5 bash startagent.sh
    this works for sometime but suddenly stop saying it can't find or recognize those commands
    Kevin Kho

    Kevin Kho

    6 months ago
    Hey @Hedgar, what is the goal here, run the agent with cron?
    h

    Hedgar

    6 months ago
    Yes, you may want to know that this is necessary because lambda start and stops the ec2 instance therefore upon starting the instance I want to
    prefect agent local start
    Kevin Kho

    Kevin Kho

    6 months ago
    Could you give me an example of an error?
    h

    Hedgar

    6 months ago
    /bin/sh: permission denied
    Under the cronjob code is
    07 18 * * 1-5 bash /home/ec2-user/startagent.sh