Having trouble running cron job script only works on terminal as root
by PROBLEMCHYLD from LinuxQuestions.org on (#5853V)
I have a couple scripts that needs to run but doesn't work when added to cron job. I can run it manually as root but other than that its a no-go. The script that resides in root is suppose to launch from the cron job as soon as chromium is open.
Code:#!/bin/bash
START="/root/blahblah.sh"
PGREP="/usr/bin/pgrep"
CHROME="/usr/bin/chromium"
$PGREP ${CHROME}
if [ $? -ne 0 ]
then
$START
fi


Code:#!/bin/bash
START="/root/blahblah.sh"
PGREP="/usr/bin/pgrep"
CHROME="/usr/bin/chromium"
$PGREP ${CHROME}
if [ $? -ne 0 ]
then
$START
fi