: Is it possible to execute a process (let say every hours)
: when a particular user is logged in ?
: I mean:
: The process should start when the user logs in.
: The process should be executed every hours.
: The process should be no longer called when the user logs off.
: Thank you
: Thierry
--
Mr.T.,
assuming you have already looked at the man page for cron, you're probably
interested in the contents of a cron command to do the above. this command
can be accomplished with an if statement. for example, in a single line:
if ps -ularh | egrep "[-]ksh" 1>/dev/null 2>&1; then echo "im here";
else echo "im not here"; fi
the command is broken in two to accomodate my news viewer, but must be in one
line for cron. the echo commands could be replaced with anything you like.
beware that mischief could be accomplished the same way, so systems people
like to restrict cron capability. the 'larh' above is my userid and '-ksh' is
a line that appears in my set of processes whether logged on in windows or
without windows. hope this helps.
------------------------------------------------------------------------------
Colorado Springs Tech Center | construed as anything but my humble opinion.
Hewlett Packard Company | HP is under no obligation to support it.
------------------------------------------------------------------------------