[PLUG] cron question

Richard C. Steffens rsteff at comcast.net
Fri Sep 21 03:37:20 UTC 2007


Michael Rasmussen wrote:
> for testing you might want something like
> 
> 1,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/rsteff/ShellScripts/x10-lights-on.sh
> 3,7,12,17,22,27,32,37,42,47,52,57 * * * * /home/rsteff/ShellScripts/x10-lights-off.sh
> 
> Then you can watch lights go on and off every five minutes

OK, I'll give that a try.

> The commands given in the files may rely on a path environment variable that
> doesn't exist in the cron environment.
> 
> so if the x10-lights-on.sh says something like:
>   br -c A -n 1
> you may need to change it to 
>  /usr/bin/br -c A -n 1
> 
> If that's not the case post a script so we can have more information to work
> with.

I started out with full path names:

/home/rsteff/ShellScripts/x10-lights-off.sh
----------------------------------------------
#!/bin/sh
#
# turn off lights in living room and bedroom

# turn off living room table lamp, k7
/home/rsteff/Downloads/x10/x10 turn k7 off

# turn off bedroom picture lamp, k8
/home/rsteff/Downloads/x10/x10 turn k8 off
----------------------------------------------

/home/rsteff/ShellScripts/x10-lights-on.sh
----------------------------------------------
#!/bin/sh
#
# turn on lights in living room and bedroom

# turn on living room table lamp, k7
/home/rsteff/Downloads/x10/x10 turn k7 on

# turn on bedroom picture lamp, k8
/home/rsteff/Downloads/x10/x10 turn k8 on
----------------------------------------------


-- 
Regards,

Dick Steffens




More information about the PLUG mailing list