Hi
I need to execute a command in cron job, but only if a file has been touched. Currently, my cron command is: curl "..." where "..." is my target link. I am new to this but I did manage to find something online. Hoping that someone with experience can confirm that the command below is correct:
Thank You.
I need to execute a command in cron job, but only if a file has been touched. Currently, my cron command is: curl "..." where "..." is my target link. I am new to this but I did manage to find something online. Hoping that someone with experience can confirm that the command below is correct:
PHP:
usr/local/bin/php [/tmp/.lastupdate -nt /my_dir_name/my_filename ] || (curl "https://...index.php?controller..." ; touch /tmp/.lastupdate)