fixed if statements to evalute correctly

if cloud_scheduler is running `ps $PID</dev/null` will return 0, else if it is not running it will return 1.