!!blue Posted March 11, 2004 Posted March 11, 2004 I downloaded the mt-rebuild.pl file [www.timaoutloud.org/code/mt/#mt-rebuild] and set up the cron tab. It's been giving me errors, but now I think I got it right. So, my question is can I set it up to email me when it runs correctly instead of only when it doesn't run? Sort of like this: "hi, mt-rebuild just ran and did this and did that. ok bye" any ideas? I'm guessing I'd have to edit the mt-rebuild.pl huh. thanks, !!blue Quote
MikeJ Posted March 11, 2004 Posted March 11, 2004 They way cron's work is that an email is automatically generated if there is any output at all from the script (which for cron jobs is usually only when they error). So if you just put a print statement in there that will always print something out, then an email should be generated. Just add something like this right below the "BEGIN {" line: print "MT Rebuild running.\n\n"; Just note that if you have it running at any kind of real frequency, it could generate a lot of emails. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.