I am using the web hosting server for my website. I need to run a cron job every 10 minutes but I need the cron php file outside of public_html. When going into the cron job page and clicking on create a cron job it gets me to enter the url to the cron file starting at the public_html. The thing is I don’t have the cron file located there, how can I enter the correct url for the cron job from this window?
You can’t, it has to be in public_html
How would you best recomend going about protecting the cron job file in public_html? I only need the server to access it. I don’t want any users being able to
1 Like
2 possibilities:
- Use a secret key (/public_html/script.php?secret=xyz)
- Use basic auth (not supported by 000webhost cronjob), which can be setup using the website below
https://cron-job.org