tip78 Posted February 25, 2014 Share Posted February 25, 2014 hello my os is centos 6.5 a simple script: #!/bin/sh /path/to/file/mta-server >/dev/null 2>&1 & (or mta-server -d) is not working from crond but perfectly starting server if runs by hands why? Link to comment
MTA Team Blokker_1999 Posted February 26, 2014 MTA Team Share Posted February 26, 2014 please expand the script. Check if the server is running before you start it. If it is already running you should not attempt to start another instance. That's bad practice. Also, do not send the output from the server to /dev/null, use the -d switch to deamonize, that's what it is there for. That way, when the server fails to start or crashes, the output can be recorded. If the crond fails to execute the script, check the syslog to see why it crashed. Some distributions also send a mail to your inbox for every failed cronjob. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now