Hi:
Just a little guidance please relating to cron jobs on my new VPS.
I have a .php file that I want to be run via a cron job on the 15th day of each month. The php file, which I've used on cpanel shared accounts, downloads a file, decompresses the file, and saves the file.
This is what I've done so far:
- created a new directory / folder in the /home/ directory using filezilla;
- uploaded the .php file to that directory;
- used Putty / SSH access, to edit the crontab and include the cron instructions using crontab -e.
Please confirm that this is correct for the cron instructions
0 0 15 * * /usr/local/bin/php /home/newdir/myphpfile.php
I just want to check that the "/usr/local/bin/php" part of the first section of the instructions is the correct path that will run the myphpfile.php as a php file.
After I setup the cron in the crontab, I used this command to check if the cron is working. But I guess I will not see any log record until the cron runs the first time.
grep "update-geolite.php" /var/log/cron
Is there another method to test the cron to ensure it is working OK?
Thanks
Just a little guidance please relating to cron jobs on my new VPS.
I have a .php file that I want to be run via a cron job on the 15th day of each month. The php file, which I've used on cpanel shared accounts, downloads a file, decompresses the file, and saves the file.
This is what I've done so far:
- created a new directory / folder in the /home/ directory using filezilla;
- uploaded the .php file to that directory;
- used Putty / SSH access, to edit the crontab and include the cron instructions using crontab -e.
Please confirm that this is correct for the cron instructions
0 0 15 * * /usr/local/bin/php /home/newdir/myphpfile.php
I just want to check that the "/usr/local/bin/php" part of the first section of the instructions is the correct path that will run the myphpfile.php as a php file.
After I setup the cron in the crontab, I used this command to check if the cron is working. But I guess I will not see any log record until the cron runs the first time.
grep "update-geolite.php" /var/log/cron
Is there another method to test the cron to ensure it is working OK?
Thanks