Q:

Cron starts same process twice

I have crontab configured like this:
*/2 * * * * php /home/ec2-user/myapp/myscript.php >> /home/ec2-user/myapp/log/myapp.log 2>&1

When I execute ps aux, I see the following output:
ec2-user  1296  0.0  0.0   2984   992 ?         Ss   15:36   0:00 /bin/sh -c /home/ec2-user/myapp/myscript.php >> /home/ec2-user/myapp/log/myapp.log 2>&1 SHELL=/bin/sh HOME=/home/ec2-user PATH=/usr/bin:/bin LOGNAME=ec2-user USER=ec2-user
ec2-user  1299  0.3  3.7  91528 63612 ?         S    15:36   0:16 /home/ec2-user/myapp/myscript.php SHELL=/bin/sh USER=ec2-user PATH=/usr/bin:/bin PWD=/home/ec2-user SHLVL=1 HOME=/home/ec2-user LOGNAME=ec2-user _=/usr/bin/php

To me it looks like same process was started twice at the same time, process one with PID 1296, process two with PID 1299. 
Is that normal?  Why two processes are in ps output instead of one? 

A:

It looks like /bin/sh is used to invoke your cron tabs, so that they run in their own environment, that's the first process.  Then /bin/sh invokes php to run your actual script, and php is your second process.  There's nothing wrong with this. 

A:

Try to add exec before php
*/2 * * * * exec /usr/bin/php /home/ec2-user/myapp/myscript.php >> /home/ec2-user/myapp/log/myapp.log 2>&1

The shell process /bin/sh will be replaced by exec

