I try to learn how to create crontabs in a remote server.
I try to run a script every 5 minutes.
I use a server in the company "IONOS" and it is in Europe.
I have a Mac. I open the Terminal.
# I go to the server with the authentification. It works well:
ssh userName@serverName
# I open the default editor. That is Vim:
crontab -e
# I edit the file:
i
# I give my email. If the Cron fails:
MAILTO=info@example.com
# Every 5 minutes go to a file where I have a simple script that sends me an e-mail:
*/5 * * * * http://www.example.com/cron-test/1.php
# save and exit the file
:wq
The Cron does not work. I have received that error in the email that I provided:
/bin/sh: 1: https://www.example.com/cron-test/1php: not found
In that message, the address is a link and the last ":" is included in that link. I do not know if that could be the problem?
Of course, I have checked that if I go to https://www.example.com/cron-test/1php
it works well and sends me an email with php.
Please, be aware that I am new to Cron and new with the Terminal. I am just learning and making tutorials.