I ask for your help because I'm literally going crazy (given that I do not have much knowledge about it, but I'm trying to understand something).
This is my big problem :
I have a php job
. This job makes a check on DB but this is not important. The real problem is that this job must run every 30 min from 9 AM to 00PM. But:
-f 'YYYY-mm-dd H:i:s' -t 'YYYY-mm-dd H:i:s'
where -f
is the start date parameters and -t
the end date parameters.I thought that then I need a script that writes a file with something like "OK | last time of processing" or if something was wrong "KO | last time of succesfull elaboration".
So a crontab I must have a line like this: */30 9-23 * * * /path/script >/dev/null 2>&1
Then:
cd /data/httpd/magento && /opt/rh/php54/root/usr/bin/php /data/httpd/magento/job.php
job.php
with -f 'date -u "+%F %H:%M:%S"' -t 'date -u "+%F %H:%M:%S"'
with a range of 30 minutes.Example: script start at 9 AM so the range date value is -f '2018-08-07 07:00:00' -t '2018-08-07 07:30:00'
and write in the log file something like "Elaboration OK | 2018-08-07 07:30:00")
I hope I was clear. Maybe it's bullshit but it's driving me crazy