I'm trying to run a PHP script, like writing something in a txt file. If I manually load the file it works, but not with a cron job. I have cPanel and I followed what I read in the help page, but nothing works.
I tried this command
php -q /user/public_html/folder/cronTest.php
but it didn't work. I also tried
/user/local/bin/php -q /cronTest.php
I also tried to put #!/user/public_html/bin/php -q
at the top of the file, but that didn't work either. I've also tried to change file permissions with similar results.
I really need to learn how to use cronjobs, cause I'll have a lot of work where it is needed.
I intend to use cPanel to set corncobs, so I hope the problem is with the command and/or the in code in the PHP file.