Subj : Re: Cron
To   : Avon
From : deon
Date : Sun Mar 07 2021 03:23 pm

 Re: Re: Cron
 By: Avon to deon on Sun Mar 07 2021 04:04 pm

Av> zip seemed to run but scp did not what is the best way to ensure these
Av> programs like htick, scp, etc. run when called by cron?

So its been covered - a cron execution environment is pretty much bare.

The most missing variable is your $PATH, which can be set via the system paths (the . /etc/profile, etc) or you can set it explicitely with

export PATH=/patha:/pathb...

If any applications that your cron script is running and dependant on an "environment" you will also need to source or set the appropriate variables.

Also keep in mind, that a variable is only visibile in the current environment (not children of an executed process), unless the variable is "exported" (with export VARIABLE=...)
For portability, I normally set a path to what I need for a script - since location of files and apps could be different depending on which distro of Linux you are using, or who built the application package. (eg: sometimes /usr/bin, sometimes /bin, sometimes /usr/local/bin).

...����

... Ending sentences with prepositions is something up with which I will not put.
--- SBBSecho 3.12-Linux
* Origin: I'm playing with ANSI+videotex - wanna play too? (21:2/116)