Running Cron with PHP on macOS 12 Throws Error - Could not open input file
1
vote
1
answer
64
views
I have this in my crontab:
* * * * * /Applications/MAMP/bin/php/php7.2.10/bin/php -f /Users/user/Documents/radio_bycron.php 2>&1 > /Users/user/Documents/radio_bycron.php_output.txt
In /Users/user/Documents/radio_bycron.php_output.txt
, there's only one line which is:
Could not open input file: /Users/user/Documents/radio_bycron.php
I have already chmod 0777
the script /Users/user/Documents/radio_bycron.php
, but I am still getting this issue. The problem happens with or without the -f
flag.
If I execute the command directly on the Terminal, it works perfectly.
How can I solve this problem?
Asked by forgodsakehold
(413 rep)
Jul 25, 2024, 01:26 PM
Last activity: Jan 25, 2025, 10:05 AM
Last activity: Jan 25, 2025, 10:05 AM