I need to run a cron job

Operating system: CentOS 7 (64bits) + Webmin and virtualmin
OS version: 7 (64bits)

Hi,

I need to execute a JOB that is getting complicated for me.

I have tested it from the command line and it works.

It is a python script but it runs with behave (https://behave.readthedocs.io/en/stable/index.html) is to perform an automation with selenium.

To run it I need to go to the directory where the project is located, for example:

cd /var/www/project

and once inside the directory execute

behave -n “execute”

I have tried a thousand different ways but it does not work for me,

I have also tried to create a sh but it does not work for me, does anyone have any ideas?

Thanks a lot a greeting

If the job has something like cd /var/www/project && behave -n “execute” and it doesn’t work, could crontab be running as root when it needs to be the owner of the Python script?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.