6
I created 4 methods and I want to run them by accessing the link. I have already tested the methods and all are working normally, but I have tried several settings by crontab -e
.
I’ve tried to:
0 * * * * wget http://meusite/rota
0 * * * * curl http://meusite/rota
I’ve used tbm -the minuscule and capitalize, and I’ve tried also using the path of my project, example:
0 * * * * curl /var/www/projeto/rota
0 * * * * wget /var/www/projeto/rota
Note: I am doing the configuration by root. Another thing, there is a command to check if it is working, and how do I set to receive an email every time you run.
My command executes a method where it loads user data, in that method does not pass any parameter as it fetches all users
I used the debug command to see what is happening:
DEBUG output created by Wget 1.12 on linux-gnu.
--2016-02-11 16:40:01-- http://caminho/cron
Connecting to 162.243.102.127:80... connected.
Created socket 3.
Releasing 0x0000000000b80c90 (new refcount 0).
Deleting unused 0x0000000000b80c90.
---request begin---
GET /blksocial/cron/follow HTTP/1.0
User-Agent: Wget/1.12 (linux-gnu)
Accept: */*
Host: 162.243.102.127
Connection: Keep-Alive
---request end---
HTTP request sent, awaiting response...
---response begin---
HTTP/1.0 500 Internal Server Error
Date: Thu, 11 Feb 2016 18:40:03 GMT
Server: Apache/2.4.7 (Ubuntu)
X-Powered-By: PHP/5.5.9-1ubuntu4.14
Cache-Control: no-cache, private
Connection: close
Content-Type: text/html
---response end---
500 Internal Server Error
Closed fd 3
2016-02-11 16:40:01 ERROR 500: Internal Server Error
Before anything you need to check this 500 error returned by server.
– zentrunix
If the answer below has helped you, please click on the check mark next to the reply to mark it as accepted.
– Daniel
Is the error shown error 500? Error 500 is server-side, not client-side. Even putting the path of the executable (which is recommended) in cron, this would not change the error
– Jefferson Quesado