I have created 4 methods and want to execute them by accessing the link. I have already tested the methods and they are all working normally, but I have already tried several configurations for crontab -e
.
I've tried:
0 * * * * wget http://meusite/rota
0 * * * * curl http://meusite/rota
I've also used the smallest and most capital, and I've already tried using the path of my project, for example:
0 * * * * curl /var/www/projeto/rota
0 * * * * wget /var/www/projeto/rota
Note: I am doing the configuration with root. Another thing, there is a command to check if it is working, and how to configure it to receive an email each time it is run.
My command executes a method where it loads the user data, in that method does not pass any parameter, because it searches all users
I used the debug command to see what's 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