cipcip
Basic Pleskian
Hi guys,
I need help setting up a crontab on my plesk server. It seems that I cannot get it to work
...
I am using:
So basically, I want it to run / check every 5 minutes to see if my script is running. If is not running, start it, if it is running skip.
The log files is not getting created and the cron never starts. I am testing with:
What I get ?
One other thing, I do not understand why I have multiple entries ? How can I delete the extra ones ? Because if I open the file under: /var/spool/cron/crontabs/root , I only have the one that I am using there, not the old ones anymore.
I also tried to use: sudo service cron reload - but it is not starting or the old ones are not being removed.
Thank you,
Cristian.
I need help setting up a crontab on my plesk server. It seems that I cannot get it to work
I am using:
*/5 * * * * pgrep -f main.py || nohup python3 cd /var/www/vhosts/criago.com/httpdocs/pie/main.py >> /var/www/vhosts/criago.com/httpdocs/pie/freakin.log
So basically, I want it to run / check every 5 minutes to see if my script is running. If is not running, start it, if it is running skip.
The log files is not getting created and the cron never starts. I am testing with:
ps ax | grep main.py
What I get ?
27781 ? Ss 0:00 /bin/sh -c pgrep -f main.py | pgrep python3 || nohup python3 /var/www/vhosts/criago.com/httpdocs/pie/main.py > test.out
27785 ? S 0:00 python3 /var/www/vhosts/criago.com/httpdocs/pie/main.py
29506 pts/0 S+ 0:00 grep --color=auto main.py
One other thing, I do not understand why I have multiple entries ? How can I delete the extra ones ? Because if I open the file under: /var/spool/cron/crontabs/root , I only have the one that I am using there, not the old ones anymore.
I also tried to use: sudo service cron reload - but it is not starting or the old ones are not being removed.
Thank you,
Cristian.