hello, im trying to set up a crontab that would run every minute but i keep getting permission denied and im not sure what i have done wrong
this is what it sends my email v
"/bin/sh: /usr/www/[username]/public/[folder]/[folder]/[whatiwanttorun.php]: Permission denied"
and this is what i have in crontab v
"* * * * * ~/public/[folder]/[folder]/[whatiwanttorun.php]"
would anyone be able to help me?
Need help with crontab
-
- New to forums
- Posts: 2
- https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
- Joined: Sat May 22, 2021 3:33 pm
Re: Need help with crontab
Is the PHP file designed to be run from the CLI and not the browser? If so, all you should need to do is change the line to this:
Having "/usr/bin/php -q" in front of the script will execute it through PHP.
Code: Select all
* * * * * /usr/bin/php -q ~/public/[folder]/[folder]/[whatiwanttorun.php]
Re: Need help with crontab
ah didnt know that but thank you, it works now
Re: Need help with crontab
No problem.
Take care!
Take care!