*.5 * * /bin/php/project/hello.php 5minute run 30 5 * report DISPLAY=0; /home/me/good_morning.sh My service Linux 5 *1 */usr/bin/python3 / root/guo/caiji_wordpress_chinnews_ok.py* >> /root/guo/cron-caiji.log 2>&1 synthesizing task cron.sh is ok*/5 * *export DISPLAY=0;/usr/bin/python3 / root/tor.py >> /root/tor.log 2>&= ⁇ = = = = = = = = = = = = = = = = = = = = = = = for creating scripts = installation of python3-m pip install has bugged me for near 6 hours. So if I write / usr/bin/python3-u/root/apps/bridge/cinkselenium. py interming it is working fine. But it doesn’t work for crontab. Right? Add from private reporting What you need is to make a shell Script and write the follow-up – cron.sh =chmod+x cron.sh #!/usr/bin/envbash export DISTAY=0 xPATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/bin nohup /usr/bin/python3-u/root/tor.pyyin > /root/tor.log &y
Now run the shell script from Crontab -e
* * * * * /root/cron.sh
This is what works properly for selenium in crontab without headache in DigitalOcean servers. The paths will be different based on your server and program location.
share improve this answer follow
![]()
未经允许不得转载:萌萌Apprentissage » run crontab with python selenium tor browser display in linux
linux One Chinese script
Google shell enable enhanced mode 4 nuclear 16G RAM
Python batches to extract mainstream search engine pictures
Python's word crawling across 100 degrees.
PythonTaiichi Taipei Artificial Intelligence Tensoflow Graphic Processing
Selenium with Tor Browser using Python