Tuesday, May 7, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 9440  / 1 Year ago, wed, february 22, 2023, 5:04:11

On my Ubuntu 11.04 server when I try to run



 service powernap stop


as a cron job with the root user, it fails and gives me this message in syslog



 NAS CRON[10853]: (CRON) error (grandchild #10854 failed with exit status 2)


and this is emailed to the root users email account



 exec: 129: stop: not found


I can start and stop the powernap service from the command line so why doesn't it work from cron?


More From » 11.04

 Answers
2

Looks like /sbin is not in $PATH when starting it from cron. Add a line like



PATH = /sbin:$PATH


to the crontab file.


[#44329] Friday, February 24, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
lotceptin

Total Points: 374
Total Questions: 106
Total Answers: 118

Location: The Bahamas
Member since Tue, Apr 27, 2021
3 Years ago
;