Bash
Why bash script does not work on crontab
Recently I met an issue that my shell script does not run in crontab. But when I run them directly it works. For example consider this bash:
#!/usr/bin/env bash
aws ec2 stop-instances --instance-ids i-0cebb331ce02934a i-08c55f40aadfa64e i-09aeaec43de5e67e i-09a63f61a682f8d9 i-049cfae6dd25b799
Works perfectly fine when run
./stop-instances.sh