This is the crontab:
0 10 * * * (file_path).sh > /data/log/(file_name).log 2>&1
Every day at 10am, this is the result when I check on this shell script using ps -ef | grep 'file_name'
report 1234 5678 0 10:00 ? 00:00:00 /bin/sh -c (file_path).sh > /data/log/(file_name).log 2>&1
report 8270 1234 0 10:00 ? 00:00:00 /bin/sh -c (file_path).sh > /data/log/(file_name).log 2>&1
report 9290 8270 0 10:00 ? 00:00:00 sqlplus -s @/(file_path).sql > /data/log/(file_name).sql.log 2>&1
Because of this, this crontab takes a very long time because it is running the shell script twice before going to the sql script.
When checking at crontab -e
, there’s only one line executing this. So there is no duplicate cronjobs running at the same time. Based on this one line, it is executing the shell script twice.
Anyone know why this keeps happening?