I have a cronjob that is running off a php script which works with one exception. The task of the script is to take a file and replicate it, if there are any files of a certain type in a given folder or any of its subfolders.
If I go to the script that is what I want the cronjob to be in my browser, the script works as expected however when the cronjob runs it doesn't work says file can't be found (not the script, but the file I am trying to replicate)
Which has me wondering what type of path am I supposed to use with a cronjob?
Currently the folder structure is /public_html/cron.php /public_html/sub_folder/sub_folder/FileName.ext
testing it in the browser with file_exists()
using a path like ./sub_folder/sub_folder/FileName.ext
throws true
running through the cron it throws false. Which has me wondering what type of path should I be using and from which level of the server?