Timeline for Check if script is started by cron, rather than invoked manually
Current License: CC BY-SA 4.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 18 at 1:01 | comment | added | Barmar | What about the more common [ -t 0 ] to test if stdin is a terminal? | |
| May 17, 2023 at 15:35 | history | edited | Adam Katz | CC BY-SA 4.0 | pipe the error away or else cron will email you about 'cannot create /dev/tty: No such device or address' |
| May 17, 2023 at 15:14 | comment | added | Adam Katz | Interesting, this exits 0 interactively and 2 from cron. [ -w /dev/tty ] exits 0 in both scenarios. | |
| Jan 24, 2018 at 10:03 | review | Late answers | |||
| Jan 24, 2018 at 10:20 | |||||
| Jan 24, 2018 at 9:47 | review | First posts | |||
| Jan 24, 2018 at 10:33 | |||||
| Jan 24, 2018 at 9:43 | history | answered | Stephen | CC BY-SA 3.0 |