- Joined
- Aug 29, 2011
- Messages
- 52
- Reaction score
- 3
CentOS7X, please help me with the cron command
The cron logs are running normally, but the script commands are not effective? Can you help me take a look at the code?
#!/bin/sh
logfile=/home/cabal/logs/nation_war.log
echo "`date`: Nation War starting" | tee -a $logfile
echo -e "\n\033[0;32m..-----Starting up CABAL NationWar-----..\033[0m"
systemctl restart WorldSvr_01_16 service
The individual test command is effective:
systemctl restart WorldSvr_01_16 service
The cron logs are running normally, but the script commands are not effective? Can you help me take a look at the code?
#!/bin/sh
logfile=/home/cabal/logs/nation_war.log
echo "`date`: Nation War starting" | tee -a $logfile
echo -e "\n\033[0;32m..-----Starting up CABAL NationWar-----..\033[0m"
systemctl restart WorldSvr_01_16 service
The individual test command is effective:
systemctl restart WorldSvr_01_16 service