I've been trying to get the hang of cron jobs and shell scripts, but I'm facing an issue where nothing gets printed to the terminal. Here's a quick rundown of what I'm working with:
For my shell script located at /home/user/sayhello.sh, I've got the following code:
```bash
#!/bin/bash
wall "This message prints every minute."
```
In my crontab, I've set it up like this:
```
* * * * * DISPLAY=:0 xterm -e /home/user/sayhello.sh
```
It seems like the cron job is executing every minute since I checked the cron log, but I'm not seeing any output on the terminal. Any advice?
1 Answer
So I tried just running the script like this in crontab:
```
* * * * * /home/user/sayhello.sh
```
but I didn't see any output either. It’s probably still a permission issue or the way you're invoking `wall`. Make sure your script runs fine outside the cron first!
Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically