Solved

linux cron job

Posted on 2006-11-06
6
446 Views
Last Modified: 2010-04-20
hello,
I need 3 cron jobs every 24 hours
3:01am
3:02am
3:03am

for
/usr/bin/php /home/virtual/var/www/html/page1.php > /dev/null
/usr/bin/php /home/virtual/var/www/html/page2.php > /dev/null
/usr/bin/php /home/virtual/var/www/html/page3.php > /dev/null

can someone help me ?
0
Comment
Question by:Sabrin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 45

Accepted Solution

by:
sunnycoder earned 500 total points
ID: 17880021
Hi Sabrin,

1 3 * * * /usr/bin/php /home/virtual/var/www/html/page1.php > /dev/null
2 3 * * * /usr/bin/php /home/virtual/var/www/html/page2.php > /dev/null
3 3 * * * /usr/bin/php /home/virtual/var/www/html/page3.php > /dev/null

Cheers!
sunnycoder
0
 
LVL 6

Expert Comment

by:_iskywalker_
ID: 17880022
Cron has the arguments
Minutes hours days Month weekdays command

1 3 * * * /usr/bin/php /home/virtual/var/www/html/page1.php > /dev/null
2 3 * * * /usr/bin/php /home/virtual/var/www/html/page2.php > /dev/null
3 3 * * * /usr/bin/php /home/virtual/var/www/html/page3.php > /dev/null


put it in your cron.tab
0
 
LVL 6

Expert Comment

by:_iskywalker_
ID: 17880026
**** sunnycoder was one minute (or less than 60 seconds)  faster...
0
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

 
LVL 11

Expert Comment

by:elbereth21
ID: 17880033
Hi Sabrin,
if I understand correctly, you only need to set the time of execution for these three processes, so:
01,02,03 03 *** /usr/bin/php /home/virtual/var/www/html/index.php > /dev/null

Elbereth.
0
 
LVL 11

Expert Comment

by:elbereth21
ID: 17880041
You were both faster than me, but what puzzles me is, where did I get that index.php from??? :)
0
 
LVL 11

Expert Comment

by:elbereth21
ID: 17880048
Just in case, you need it for future reference, here is an useful help page for cron syntax:
http://www.linuxhelp.net/guides/cron/
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

689 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question