Jump to content

Recommended Posts

Posted

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

Posted

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. :dance:

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...