Answer the question
In order to leave comments, you need to log in
How to run nosetests utility in cron?
I need a script written in python using Silenium to run once per minute.
I have autotest. It enters the site, performs an operation on the elements on the page, and exits. It is launched using the nosetests utility. The launch looks like this:
nosetests qwerty.py
test runs and I get a message
Ran 1 test in 8.293s
OK
#!/bin/bash
nosetests qwerty.py
*/1 * * * * /home/xxx/PycharmProjects/AutoTest/features/nose_tests/12.sh > /tmp/qwert2.log 2>&1
witch nosetests
/home/xxx/.local/bin/nosetests
/home/xxx/.local/bin/nosetests qwerty.py
Traceback (most recent call last):
File "/home/xxx/.local/bin/nosetests", line 7, in <module>
from nose import run_exit
ImportError: No module named 'nose'
/usr/bin/python3 /home/xxx/.local/bin/nosetests /home/xxx/PycharmProjects/AutoTest/features/nose_tests/qlean_sms.py
Answer the question
In order to leave comments, you need to log in
Why do you need a bash script if you can write it directly in the cron?
How do you execute a command in the console? Also, only with the full path you need to write to cron. And for every minute execution, you need not */1 * * * * , but like this * * * * *
* * * * * /usr/bin/nosetests /home/xxx/PycharmProjects/AutoTest/features/qwerty.py > /var/log/nosetests.log&
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question