I set up a cron job on my site with Hostinger that is supposed to scrape news contents and dump the information into a text file. This isn't what I want my cron output to be, but a byproduct of running the script.
If I simply wisit the webpage this is located at, I get a success. It correctly opens the file and writes the news data to it. When it's run by the cron job, however, I get the output
PHP Warning: fopen(../txtdumps/newsdump.txt): failed to open stream: No such file or directory in /home/u189772133/public_html/cronjobs/newsscrape.php on line 12
Unable to open file
I've never done a cron job before, so is it just bad practice to open and write to files within one, or is this simply a pathing issue?