Hosting Articles Technical Articles

How To Set Cron Job In Centos Server

 

 

                                                                                      How To Set Cron Job In Centos Server

Description:

To execute the files user can set Cron job so that assigned Job will run at the particular time which was set in crontab.Here is the simple steps to configure Cron Job.

How To Set Cron Job In Centos Server01

Steps:

– Login To the server using root log in details.

– Open crontab -e

– Now enter the file path and set the time.Here is the some of the example,

0 0,6,12,18 * * * php -q /var/www/domain.com/parse_xml_feed.php  ( This will run every 6 hours)

# at 3:30AM in the file /var/phpinfo
30 3 * * mon cat /proc/meminfo >>  /var/phpinfo

A script every 15 minutes

*/15 * * * * /usr/local/bin/perl /home/domain/domain.com/myscript.pl

-After enter in to the desired cron job press esc and ZZ to save and quit from the cron tab file.

– To verify the running crons in the server use the below command,

crontab -l

– To remove the complete crons use the below command,

crontab -r

 

Tags:Cron Job,Cron Job in centos,Cron Job configuration,Cron Job path,Crontab file,Crontab issue,Cron Tab configuration

About the author

admin

Add Comment

Click here to post a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.