← Back to EasyCron.com

Mar 23, 2018

Output regexp matching

In some cases, you may want to determine the success (or failure) of cron job execution by the content of the output responded from your cron job script (not only by the HTTP code).

With the new feature we introduced today, you can now use regexp to match the output (HTTP message body), and then judge if the cron job execution is successful.


Output regexp matching

As you can see in the screenshot, there are 3 options you could choose from as the condition for your execution to be considered as succeeded or failed:

  • When the HTTP Status is 2xx, consider succeeded. (This is the default option)
  • When the HTTP Status is 2xx, consider succeeded if the HTTP message body matches a specified regular expression.
  • When the HTTP Status is 2xx, consider failed if the HTTP message body matches a specified regular expression.

After above 3 new options were added, the complete rules for judging success or failure are:

  1. Consider failed when the HTTP Status is NOT 2xx (e.g. 200, 201, etc.).
  2. When the HTTP Status is 2xx, check above 3 options.

For the sake of simplicity and matching performance, we use Google re2 as the regexp engine.

Hope that the new feature rocks for you.

Jan 21, 2018

Execution logs enhanced

We recently made some changes to the way we trim and save execution logs.

In the past, in additional to cron job ID, scheduled time to execute, trigger time, done time, cost time and HTTP status, up to 10 KB of output (includes HTTP headers and HTTP message body) responded from your cron job script will be saved for each execution.

Now, the log output part saved in new way will contain:

  • up to 10 KB of HTTP headers, plus
  • up to 20 KB (5 KB for individual plans) of head of the HTTP message body, plus
  • a line of text (example: 1200 Characters Stripped) inserted by EasyCron indicating how many characters were stripped (if the whole HTTP message body is longer than the log length limit of your plan), plus
  • up to 20 KB (5 KB for individual plans) of tail of the HTTP message body.

We hope that the new logs will provide more information you need and help you better understand the overall response from your cron job scripts.

Jan 5, 2018

Cron job execution tracking

Want to know if your cron job has been triggered or not before it's done and its log is saved? Now you're able to do it with our new feature "cron job execution tracking".

With cron job execution tracking, when your cron job has been triggered and is running, your will see an "executing" line immediately in the logs of this cron job telling you that it's executing, like screenshot below:


Cron job execution tracking

This is extremely useful for your awareness of that the cron job has been successfully fired. So that you don't need to worry about you miss the cron job trigger time.