Basic Cron Job

I’m trying to setup up a basic cron job in my cPanel which will simply load a php file, which executes and creates a html file. Here is the cron job I set up in cPanel:

/usr/local/bin/php -f /home/ACCOUNTNAME/public_html/example/example_file.php

This is working, however, it is putting the file in the ROOT of my server, while i would like to be able to choose where this file goes when created.

When I load the php file in the browser it puts the file in the same place as the php file.

Any suggestions?


Nevermind I found the solution. It was just a matter of changing the php file to output the whole file directory for the file the php created.