[ale] Bash: How to determine if called from cron?

Christopher Woodfield rekoil at semihuman.com
Mon Jun 27 17:41:06 EDT 2005


I generally write my scripts to accept a --cron argument for this  
purpose.

-C

On Jun 27, 2005, at 12:17 AM, Christopher Bergeron wrote:

> Does anyone know of an easy way for my script to determine if it's  
> being run from cron or from a user shell?
> I have a feeling theres an easy way to do this, but I'm drawing a  
> complete blank right now.  I'm looking at my Environment vars, but  
> I'm not sure what gets set by Cron when it runs a script.
>
> Any ideas are much appreciated...
>
> Kind regards,
> CB
>
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
>
>



More information about the Ale mailing list