Cronjob

m (Created page with "<div align=justify>'''What is cron?''' Cron is the name of an automated program setup for Linux & Unix operating systems that allows the users to execute commands or cron script...")
 
m
 
Line 1: Line 1:
 +
<seo title="Cronjob" metakeywords="cron job,job schedule,job scheduling,set cron,cron script,what is cron,cronjob,add cron" metadescription="Cronjob" />
 +
 
<div align=justify>'''What is cron?'''
 
<div align=justify>'''What is cron?'''
  
Line 8: Line 10:
  
 
You can add cron jobs via '''cPanel => Advanced => Cron Jobs'''.  
 
You can add cron jobs via '''cPanel => Advanced => Cron Jobs'''.  
There you'll be asked to set the '''Cron Email'''. This is the email address at which you would like to receive notifications whenever your cron scripts are run. To set the cron email simply enter the address needed into the '''Email''' filed and click '''Update email'''.
+
There you'll be asked to set the '''Cron Email'''. This is the email address at which you would like to receive notifications whenever your cron scripts are run. To set the cron email simply enter the address needed into the '''Email''' field and click '''Update email'''.
  
 
Follow these steps to set cron job scheduling:
 
Follow these steps to set cron job scheduling:
Line 14: Line 16:
 
'''1'''. Configure the time interval at which you would like to run the cron job.
 
'''1'''. Configure the time interval at which you would like to run the cron job.
  
* Common Settings — Using this menu you can select a commonly used interval without having to specify settings for the minute, hour, day, month, and so on.
+
* '''''Common Settings''''' — Using this menu you can select a commonly used interval without having to specify settings for the minute, hour, day, month, and so on.
  
* Minute — Use this drop-down menu to select the number of minutes between running the cron job, or the minute each hour you wish to run the job scheduling on.
+
* '''''Minute''''' — Use this drop-down menu to select the number of minutes between running the cron job, or the minute each hour you wish to run the job scheduling on.
  
* Hour — Use this drop-down menu to select the number of hours between running the cron job, or the hour each day you wish to run the cronjob on.
+
* '''''Hour''''' — Use this drop-down menu to select the number of hours between running the cron job, or the hour each day you wish to run the cronjob on.
  
* Day — Use this drop-down menu to select the number of days between running the cron job, or the day of the month you wish to run the cron job on.
+
* '''''Day''''' — Use this drop-down menu to select the number of days between running the cron job, or the day of the month you wish to run the cron job on.
  
* Month — Use this drop-down menu to select the number of months between running the cron job, or the month of the year you wish to run the cronjob in.
+
* '''''Month''''' — Use this drop-down menu to select the number of months between running the cron job, or the month of the year you wish to run the cronjob in.
  
* Weekday — Use this drop-down menu to select the day(s) of the week you wish to run the cronjob on.  
+
* '''''Weekday''''' — Use this drop-down menu to select the day(s) of the week you wish to run the cronjob on.  
  
 
'''2'''. In the Command field, type the command or cron script you wish the system to run.
 
'''2'''. In the Command field, type the command or cron script you wish the system to run.
  
'''Note''': If you do not want to receive an email notifications of a specific cron job, add the following line to the command: >/dev/null 2>&1
+
'''Note''': If you do not want to receive an email notifications of a specific cron job, add the following line to the command:  
 +
 
 +
'''''>/dev/null 2>&1'''''
 
   
 
   
 
'''3'''. Click '''Add New Cron Job''''.  
 
'''3'''. Click '''Add New Cron Job''''.  
Line 40: Line 44:
 
where
 
where
  
''* * * * * command to be executed
+
* * * * * command to be executed
1 2 3 4 5
+
1 2 3 4 5
| | | | |
+
| | | | |
| | | | ----- Day of week (0 - 7)  
+
| | | | ----- Day of week (0 - 7)  
| | | ------- Month (1 - 12)
+
| | | ------- Month (1 - 12)
| | --------- Day of month (1 - 31)
+
| | --------- Day of month (1 - 31)
| ----------- Hour (0 - 23)
+
| ----------- Hour (0 - 23)
------------- Minute (0 - 59)''
+
------------- Minute (0 - 59)
  
All set cron jobs are displayed under the '''Current Cron Jobs''' table.
+
All set cron jobs are displayed under the '''Current Cron Jobs''' table.</div>

Latest revision as of 12:45, 8 November 2011

rss feed for my website