Saturday, July 19, 2014

Enable / Disable SetCronJob DNS cache

This is an update to SetCronJob DNS cache. Since the day SetCronJob DNS cache was created, it is enabled by default and you can't make any change to it. This solves and generates some problems, so we should let you enable or disable it on your own.

How to enable/disable SetCronJob DNS cache?

To change it, click Edit cronjob, More options, you'll see the DNS cache option below the Name field.
The DNS cache option (click Edit cronjob, More options to see)
To enable it, check the box, and Save cronjob. To disable it, uncheck (clear) the box and Save cronjob.

You can also select multiple cronjobs, then click With selected: Edit cronjobs, and select desired DNS cache option.

You won't see any different after enable or disable the DNS cache.

When to enable SetCronJob DNS cache

Our DNS cache is enabled by default, and it's recommended to do so. So if your cronjobs work fine with DNS cache enabled, just leave it there. There are some benefits:
  • It get rids of name lookup, thus makes your script executed quicker.
  • It also minimizes lookup errors e.g. in case your name server doesn't respond, we still have the cache.
  • It ignores DNS records' TTL (not a good practice), so if your name server is down and your domain name is unreachable, your scheduled scripts in your web server are still running fine.

When to disable SetCronJob DNS cache

SetCronJob DNS cache may make some problems, and in these cases below you should disable it:
  • Your website is under SSL (HTTPS), and SSL error occurs when we try to execute your cronjob. Maybe your SSL certificate is used for multiple domain name with the same IP address, while SetCronJob DNS cache will disable the SNI feature, thus it doesn't work.
  • Your website is using IPv6 only. Our DNS cache doesn't work with IPv6, while our library works fine. Disabling the DNS cache will let our library choose which IP version to connect, and it seems it prefer IPv6 though.
  • Your website IP addresses are updated frequently.
The IPv6 test. SetCronJob's IPv6 is 2600:3c01::f03c:91ff:fe56:75d1, and whatismyv6's IPv6 is 2001:4810::110
If you have any question, please feel free to email me.

Wednesday, June 11, 2014

Adding random number to your cronjob URL

Update on Aug 22, 2014: Adding two more keywords: __account__ and __cronjob__. This feature is now supported in both URL and POST data (click Edit cronjob > More options > select HTTP Method: POST or PUT).

To prevent your web server from caching your cron script result, you can now add these keywords into your URL and POST data, and it'll automatically be replaced with a number when your cronjob is executed:

__random__ will be replaced with a random number
__timestamp__ will be replaced with the current Unix timestamp
__account__ will be replaced with your SetCronJob account ID
__cronjob__ will be replaced with your cronjob ID
(You can suggest more keywords by contacting me.)

For example, you can add it into your cronjob URL like this:
http://yoursite.com/path/to/cron.php?name=value&random=__random__

Each time your cronjob is executed, SetCronJob will replace that keyword with a random number, for example:
http://yoursite.com/path/to/cron.php?name=value&random=1875782368
http://yoursite.com/path/to/cron.php?name=value&random=2100737957
http://yoursite.com/path/to/cron.php?name=value&random=2134219102

If you have any question or need any help, feel free to contact me or leave a comment below.

Thursday, April 10, 2014

Security Update: Heartbleed

Hello all,

You may recently hear about Heartbleed, an OpenSSL bug that allows attackers stealing protected information. 2 years ago, SetCronJob went 100% SSL to make sure your data is safe and secured. Like many other teams, we took action immediately to fix the vulnerability.

Now SetCronJob is no longer vulnerable. You can test it here.

We also regenerate our SSL certificate as recommended by security experts. However, you're strongly recommended to change your password at SetCronJob and many services that you've logged in recently.

BTW, your password is not stored on SetCronJob server. We use the best one-way encrypted function to encode your password, so even when our database is exposed, attackers can't get your plain password.

If you have any questions or concerns, please email me.

Best regards,
Nguyen An Thuan.

Sunday, November 24, 2013

Check cron output against a pattern

You can check your cronjob's output against a string or pattern now. If it matches the provided string/pattern, we'll send you a notification.
Notify you if your cronjob output contains fail, error, fatal or warning text.
To add a string or pattern to check, just Edit your cronjob, click More options and enter desired string. We supports:

Normal text
Enter anything you want e.g. for Fatal error, we'll notify you if your script prints out some text containing Fatal error. Please note that this is case-insensitive check, e.g. "fatal error", "Fatal Error" or "fAtAl ErRoR" are considered as match.

Regular expression
Its format is the same of PHP's preg_match pattern syntax (PCRE syntax). It must starts with / and ends with / (plus modifiers if any).
For example, with /fail|error|warning/i, we'll notify you if your script output contains fail, error or warning (the i modifier will make it case-insensitive check).

Negative check
Add a exclamation mark ! before the text or regular expression, we'll notify you if the script output does not match the text/pattern.
For example, !success will require SetCronJob notify you if the script output doesn't contain success.

If you have any question or suggestion, feel free to let us know by leaving a comment below, or email us.

Thursday, November 14, 2013

Cronjobs every 30 seconds

Besides Minute, Hour, Day, Month, Weekday, we've just added a new time field: Second, with selectable values 0 and 30. With this new field, you can set up your cronjob to run every 30 seconds (twice a minute).

To make your cronjob execute twice a minute, just Edit your cronjob, then select When to call: Every 30 seconds.
Set cronjob to run every 30 seconds
You can also hit Details button and select desired Second values for your new and existing cronjob e.g. make your cronjob execute at midnight,second 30 if necessary.
Run cronjob at midnight, second 30 (00:00:30)
Cronjob every 30 seconds will run 2,880 times a day, so a Silver account can add 1 cronjob every 30 seconds, and a Gold account (with 7200 daily executions) can add 2 cronjobs every 30 seconds. We also offer bigger Gold plan with more daily cron executions, check it out at Billing > My Plans tab.

If you have any question or feature suggestion, feel free to comment below or contact us.