Current location: Hot Scripts Forums » Programming Languages » PHP » Crontab


Crontab

Reply
  #1 (permalink)  
Old 09-11-06, 06:34 AM
henryw henryw is offline
Newbie Coder
 
Join Date: May 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Crontab

Hello,
I apologize if this is in the wrong forum.

When I edit my crontab file (using crontab -e), I want to include an additional file that has cron commands in it. This is so that I can include a file that is in a directory I sync to a couple of machines.

So as an example:

#crontab -e:>
10 * * * * /usr/local/bin/php /home/pscom/cron/accountsize.php
include "/path/to/other/cron/commands/file (THIS Line is the one I need to get working with your help!)


#tail /path/to/other/cron/commands/file:>
3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54 ,57 * * * * /usr/local/bin/php /home/pscom/cron/smsqueue.php
* * * * * /usr/local/bin/php /home/pscom/cron/mailqueue.php


Any help would be much appreciated.
Reply With Quote
  #2 (permalink)  
Old 09-11-06, 02:26 PM
King Coder King Coder is offline
Community VIP
 
Join Date: Jan 2006
Posts: 703
Thanks: 0
Thanked 0 Times in 0 Posts
I'll move it to php... Guys there know a whole lot more about this than me

Hope you get it solved!
__________________
my site
Reply With Quote
  #3 (permalink)  
Old 09-11-06, 02:32 PM
Skeleton Man Skeleton Man is offline
Community Liaison
 
Join Date: Jun 2003
Location: Australia
Posts: 406
Thanks: 0
Thanked 0 Times in 0 Posts
To my knowledge you can't "include" files with crontab.. all your commands need to be in the one crontab file. Why can't you put everything in the one file ?
__________________
Chris (aka Skeleton Man)
ProgrammingTalk's Perl/PHP Moderator !
Reply With Quote
  #4 (permalink)  
Old 09-14-06, 03:54 AM
henryw henryw is offline
Newbie Coder
 
Join Date: May 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks for your reply.

I got around it by putting a sym link in /etc/cron.d/ to my project directory.

The reason was because I want to be able to rsync cron changes to the live environment as well.
Reply With Quote
  #5 (permalink)  
Old 09-14-06, 01:04 PM
Skeleton Man Skeleton Man is offline
Community Liaison
 
Join Date: Jun 2003
Location: Australia
Posts: 406
Thanks: 0
Thanked 0 Times in 0 Posts
Interesting workaround
__________________
Chris (aka Skeleton Man)
ProgrammingTalk's Perl/PHP Moderator !
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
automatically send email to the particular person everyday sujata_ghosh PHP 7 10-04-11 05:00 PM
crontab not executing a perl script abtimoteo Perl 5 05-27-08 11:42 AM
Crontab running php script Arctic PHP 2 01-04-06 06:42 PM
Global Arrays and crontab johnnytalent PHP 3 11-25-05 09:59 AM
10% LIFETIME DISCOUNT - Free Domain - Linux or Windows - 250MB/5GB Only $3.95/mo Royalty Hosting General Advertisements 0 07-30-05 02:25 PM


All times are GMT -5. The time now is 07:28 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.