CRON is certainly the very important function in UNIX as well as the Linux operating systems. It allows you to schedule a job and the job will run at the date and time which is being fixed unless and until you delete the CRON statement. Let me tell you that it is a function of which you should be aware. Even if you do not need it now, remember about CRON for the day you will need it. The format for CRON is “CRON Command to execute”.

The CRON function is certainly very elastic. In fact it can be set to run at almost any time as well as any frequency. You will just have to fix the hour as well as the minute and you will get your job done. The CRON function will run certainly daily at that particular time. This is certainly quite great.

CRON job is certainly quite great for the back up files, database, send mails, clear temporary files, generate invoices, Drupal, Joomla, PHP CRON jobs etc.

The PHP scripts used for CRON jobs

PHP is a script that has to be run before you ever think to run a program. This script could be anything, for example 644 or -rw-r–r–. Yes you can run PHP script on CRON. If your PHP scripts do not have executable permissions, then as part of the command portion of the CRON line, you must specify the PHP interpreter and pass it the filename of the PHP script that you execute.

Set this Offer is certainly quite good for the reliable online service. It is certainly a very good alternative to these feature. It is certainly included in the free or budget web hosting. Let me tell you that the CRON jobs can only be used on web servers.

Steps to Setting up a CRON job on Your Web Server

Figure out the schedule

At first you will have to figure out the schedule. You will have to decide that how many times you will have to run the function? Will it be once a day? If you see a shared web server where many websites reside on the same server then you should not run your CRON jobs to frequently.

How to write the schedule for CRON tab?

You will certainly have to make sure that the CRON tab should understand the input. This function is somewhat arcane and cryptic; hence you should take this step by step. Let me tell you one thing that the basic arrangement of a CRON tab timetable consists of 5 fields, separated by space.

1. “Minute” is a number from 0 to 59. “Hour” is a number from 0 to 23. They represent the time of the day in a 24-hour day format.

2. “Day” and “month” refer to dates. “Day” takes a value between 1 and 31, and “month”.

3. Day-of-week” means basically which day you want your command to run. If you want your command to run on Sundays, use either 0 or 7 here. If you want it on Monday, use 1.

So you can create unlimited CRON jobs every minute.

Beginning PHP: Tutorial 3 – If statement

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay


?>