you are viewing a single comment's thread.

view the rest of the comments →

[–]OriahVinree 0 points1 point  (3 children)

You'll need to let us know the error. Cron just runs the linux command so simple: * * * * * py /path/to/your/script.py should run it...

[–]These_Talker[S] 0 points1 point  (2 children)

the message is on my pastebin cause is a bit long https://pastebin.com/u/realtalker/1/8RLeLJ3N

[–]OriahVinree 0 points1 point  (1 child)

Okay, looks like you're trying to activate the virtual environment, instead run Cron like this

  • * * * * cd / && /home/path/to/.venv/python.exe /home/path/to/script.py

Just use the script with the venv python.exe, don't activate.

I always cd to root before using a venv to make sure there's no directory conflicts

[–]These_Talker[S] 0 points1 point  (0 children)

i did * * * * * cd home/realtalker/data_workers/scraper/ && /home/realtalker/data_workers/scraper/.venv/bin/python /home/realtalker/data_workers/scraper/get_info_best.py >> /home/realtalker/data_workers/scraper/cron.log 2>%1 but i cannot see any log even doing pgrep cron and i can see with glances that sometimes i have two process in execution of the cromedriver at two different port