Thursday, July 2, 2009

Set cron job with a URL

In SetCronJob, URL to call must have this structure:

http://user:pass@domain.com:port/path.ext?query=value
things in italic are optional.

- HTTP only.

HTTPS, FTP, FTPS, etc are not allowed.

- User name and password are supported.

If your URL require HTTP Authentication, simply add user:pass@ before domain name.

- All domain extensions are allowed.

You can add URL with domain.com, .net, .org, .co.uk, ..., .co.cc, .uni.cc, etc. There're some domain names restricted, such as google.com, yahoo.com, youtube.com, ...


- All ports are allowed.

Recommended ports are 80 (default), 8080 (HTTP Alternative), ...

- Must have either path or query.

It's often no need to set cron job with home page, e.g http://example.com/.

http://example.com/?q=backup (home page but have query), http://example.com/backup.php (has path), http://example.com/backup.php?mode=all&sendto=webmaster (has path and query) are allowed.

- All file extensions are allowed.

You can set cron job with file.php, .asp, .aspx, .py, .pl, .cgi, .html, .html, etc

- Fragment will be trimmed.

If your URL end with #fragment, e.g http://example.com/backup.php#useless, the #useless will be trimmed. The final URL will be http://example.com/backup.php. As fragment is used only by browser, web server don't know what fragment is inserted, so it's no need to add #fragment to your URL.

Next post: How to fix error messages like This URL is unreachable or This URL returns "HTTP/1.1....

No comments:

Post a Comment