Webcron
Encyclopedia
webcron is the term for a time-based job scheduler
Job scheduler
A job scheduler is a software application that is in charge of unattended background executions, commonly known for historical reasons as batch processing....

 hosted on a web server
Web server
Web server can refer to either the hardware or the software that helps to deliver content that can be accessed through the Internet....

. The name derives its roots from the phrase web server and the Unix daemon cron
Cron
Cron is a time-based job scheduler in Unix-like computer operating systems. Cron enables users to schedule jobs to run periodically at certain times or dates...

. A webcron solution enables users to schedule jobs to run within the web server environment on a web host that does not offer a shell account
Shell account
A shell account is a user account on a remote server which gives access to a shell via a command-line interface protocol such as telnet or ssh....

 or other means of scheduling jobs.

Overview

Many web hosts (see External links) offer shell accounts or some sort of built-in job scheduler such as cron that makes it easy for users to schedule jobs. Such hosts run jobs as command-line applications that may optionally communicate with the web server. A webcron solution, however, runs entirely within the purview of the web server environment of a web host. This allows a webcron solution to operate on hosts that do not offer a job scheduler such as cron or a shell account. A webcron solution will also run equally well on hosts that do offer users such capabilities but is designed as a substitution or replacement.

A webcron solution is made up of two pieces. The first piece is a script that will execute the tasks that resides somewhere accessible via a URL. The second piece is to use a scheduling provider that contacts the URL of the script at regular intervals.

Before setting up a schedule with a scheduling provider, a user must set up a script that runs on the web server. Most web hosts have restrictions on the length of time a single instance of a script may execute. Many web hosts also have limitations on CPU and RAM
Ram
-Animals:*Ram, an uncastrated male sheep*Ram cichlid, a species of freshwater fish endemic to Colombia and Venezuela-Military:*Battering ram*Ramming, a military tactic in which one vehicle runs into another...

 resource usage. Users of webcron solutions on shared hosting providers must be careful to not repeatedly exceed their web host's limitations so as to not get kicked off. A script that runs a long time must take into account that it may be terminated at any point by a web server process. Users may implement a state machine, which allows the script to operate across multiple invocations and run within the limitations imposed by a web host.

Third-Party

There are many third-party webcron scheduling providers on the web. These services accept a URL and a frequency schedule to retrieve, or ping, the specified URL. Most providers have restrictions built into their system to avoid overloading their servers and to encourage users to sign up for premium accounts.

Users who set up premium accounts on third-party webcron scheduling providers typically gain additional benefits such as SMS
SMS
SMS is a form of text messaging communication on phones and mobile phones. The terms SMS or sms may also refer to:- Computer hardware :...

 and email
Email
Electronic mail, commonly known as email or e-mail, is a method of exchanging digital messages from an author to one or more recipients. Modern email operates across the Internet or other computer networks. Some early email systems required that the author and the recipient both be online at the...

 notifications, uptime reports and logging, increased timeout limits, schedules won't expire, or fewer restrictions on scheduling frequency.

Visitor Based

A webcron solution can be contained entirely on a web host by letting visitors trigger a webcron scheduler script on the server. This is typically accomplished by using an 'img' HTML element in the header or footer of the website. When a visitor views the website, the image loads, which triggers the webcron scheduler. The webcron scheduler runs any tasks that need to run and then outputs an image so the visitor's web browser does not display a broken image on the page.

While the task runs, the visitor's web browser will wait until the server responds. Users of visitor based webcron scheduling typically author scripts in a way so that the script does not execute for too long.

If there are insufficient visitors to a website using visitor based webcron scheduling, then scheduled tasks will not run on time.

Since visitor based webcron scheduling enables the possibility of self-contained webcron solutions, it increases the portability of a website or web-based software product. Many web-based open-source software
Open-source software
Open-source software is computer software that is available in source code form: the source code and certain other rights normally reserved for copyright holders are provided under a software license that permits users to study, change, improve and at times also to distribute the software.Open...

 products that have tasks that need to run regularly typically use a visitor based webcron solution to execute those tasks.

Remote Access

A remote access capable webcron solution is typically bundled with a pair of client and server components. The client runs on a separate computer, such as the user's personal computer. A job schedule is set up on the computer where the client component resides. Then, when the job runs, the client component communicates with the server component.

Remote access usually offers capabilities that are impossible with other scheduling providers. The data between the client and server components is typically encrypted even across HTTP. This allows a plugin or module for the client component to talk to the server component to securely request information that is normally restricted. Compression of the data sent and received helps reduce overall bandwidth used.

A typical implementation of a remote access plugin or module is to incrementally back up files and databases from the web server to the client. Some incremental backup implementations may even offer basic host-based intrusion detection system
Host-based intrusion detection system
A host-based intrusion detection system is an intrusion detection system that monitors and analyzes the internals of a computing system as well as the network packets on its network interfaces...

 functionality.

Local Access

A webcron solution can be used on hosts that already have cron available. This is useful when required functionality is only available via the web server. The cron daemon is the scheduling provider and periodically contacts the script using another tool such as Wget
Wget
GNU Wget is a computer program that retrieves content from web servers, and is part of the GNU Project. Its name is derived from World Wide Web and get...

.

In the case of a remote access capable webcron solution, cron can run the client component to execute the script.

Security Concerns

Since webcron solutions involve availability via a URL, there are several different security concerns that users should address. A webcron solution introduces issues of trust, opportunities for denial-of-service attacks, network or packet sniffing, executing a replay attack
Replay attack
A replay attack is a form of network attack in which a valid data transmission is maliciously or fraudulently repeated or delayed. This is carried out either by the originator or by an adversary who intercepts the data and retransmits it, possibly as part of a masquerade attack by IP packet...

, and possible exposure of information. A webcron solution is an ideal entry point for criminal computer hackers
Hacker (computer security)
In computer security and everyday language, a hacker is someone who breaks into computers and computer networks. Hackers may be motivated by a multitude of reasons, including profit, protest, or because of the challenge...

.

When using a third-party scheduling provider, users trust the third-party to not misuse the URL in any way. Users also have to assume that the connection between the third-party server and the web server is secure from hackers.

When using a visitor based scheduling provider, users may inadvertently provide a possible venue for denial-of-service attacks. Also, if a script is written improperly, the script may unintentionally expose information about the server.

When using a remote access scheduling provider, users usually have refined control over how communication takes place with the web server. If HTTP is used, the URL is sent in the clear over the wire but the data in the request is typically encrypted. This opens up the possibility of denial-of-service attacks and replay attacks.

External links

  • Webcron.org - A very popular third-party scheduling provider with differents Time-Out and a reliable server monitoring tool .
  • WebCron - A webcron solution with both visitor based and remote access scheduling providers.
  • phpJobScheduler - A webcron solution with a visitor based scheduling provider.
  • easyCron.com - A webcron service provider allowing setting up webcron jobs basing on user's own date and time.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK