Hello
I'm a beginner, I've been looking for solutions on the net, but I haven't succeeded
I rented the server recently. OS Ubuntu 18.04.5 LTS , Plesk Obsidian Version 18.0.32 i have a site
The company does not offer support.
I have sheduled task a domain:
Fetch a URL : https://site.com/folder/cron.php/
This URL (php script) works perfectly whith a browser.
But when i use the sheduled task, i have an error :
"
Task "https://site.com/folder/cron.php" completed with error in 0 seconds, output:
Url 'https://site.com/folder/cron.php' fetched
Status: 404
Output:
File not found.
"
the file is in:
/var/www/vhosts/site.com/httpdocs/folder/cron.php (same: File not found)
I tried several commands found on the net, but also can't find the file (File not found)
On the server crontab file, i have:
A) In file for site: /var/spool/cron/crontabs , I have no Path. I don't think it's normal, do I?
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/opt/psa/tmp/sssY3Y4RF installed on Sun Jan 10 06:48:03 2021)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
MAILTO=""
SHELL="/bin/sh"
10 * * * * /usr/bin/php -f '/var/www/vhosts/site.com/httpdocs/_cron/cron.php'
B) In the file for root: /etc/crontab , i have
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#
I read on the internet that it is good to add the command. in the root file.
Can someone help me please ?
Ps: I have no experience. I searched the internet and found out more. I am an industrial programmer
but I still know something from college .
Thanks a lot
I'm a beginner, I've been looking for solutions on the net, but I haven't succeeded
I rented the server recently. OS Ubuntu 18.04.5 LTS , Plesk Obsidian Version 18.0.32 i have a site
The company does not offer support.
I have sheduled task a domain:
Fetch a URL : https://site.com/folder/cron.php/
This URL (php script) works perfectly whith a browser.
But when i use the sheduled task, i have an error :
"
Task "https://site.com/folder/cron.php" completed with error in 0 seconds, output:
Url 'https://site.com/folder/cron.php' fetched
Status: 404
Output:
File not found.
"
the file is in:
/var/www/vhosts/site.com/httpdocs/folder/cron.php (same: File not found)
I tried several commands found on the net, but also can't find the file (File not found)
On the server crontab file, i have:
A) In file for site: /var/spool/cron/crontabs , I have no Path. I don't think it's normal, do I?
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/opt/psa/tmp/sssY3Y4RF installed on Sun Jan 10 06:48:03 2021)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
MAILTO=""
SHELL="/bin/sh"
10 * * * * /usr/bin/php -f '/var/www/vhosts/site.com/httpdocs/_cron/cron.php'
B) In the file for root: /etc/crontab , i have
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#
I read on the internet that it is good to add the command. in the root file.
Can someone help me please ?
Ps: I have no experience. I searched the internet and found out more. I am an industrial programmer
but I still know something from college .
Thanks a lot