Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
The most reliable way is to set an environment variable in the crontab, and read this environment variable in the script, but you need to change the crontab:
CRON_MODE=1
* * * * * env > ~/env
SHELL=/usr/bin/sh
USER=rpg
PATH=/usr/bin:/bin
PWD=/home/rpg
SHLVL=1
HOME=/home/rpg
CRON_MODE=1
LOGNAME=rpg
_=/usr/bin/env
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question