1

Check if script is started by cron, rather than invoked manually

view story
linux-howto

http://unix.stackexchange.com – Is there any variable that cron set when it's running a program ? If the script is running by cron, I'll skip some parts; otherwise invoke those parts. How can I know if the bash script is started by cron ? (HowTos)