Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Help with Cron Jobs

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-03-2004, 12:06 PM
 
xcell67 xcell67 is offline
 

Senior Member
  
Join Date: Dec 2003
Posts: 149
 

Default Help with Cron Jobs

I know the basics of cron jobs, like scheduling them but I wanted to know if anyone knew how to set a cron job to run after a specific cron job finished instead of running it based on a schedule.

Example:
Cron Job A starts at 2 am finishes at 2:03 am

Cron Job B starts after cron job A finishes (2:03 am)
Reply With Quote
  #2  
Old 12-03-2004, 09:34 PM
 
jhug jhug is offline
 

Advanced Member
  
Join Date: Nov 2004
Posts: 31
 

Default

Not that I am aware of. Cron uses the Cron Table for time specific invocation of the job only and can't rely on the type of "if" logic you are suggesting. It really depends on what you are doing but an alternative would be to combine the jobs you want performed into some sort of executable script on your system e.g. Perform task a; check to see if task a is complete; when task a completes perform task b. Then use cron to invoke the script.
Reply With Quote
  #3  
Old 12-04-2004, 01:37 AM
 
Yang Xu Yang Xu is offline
 

Senior Member
  
Join Date: May 2004
Location: Portland, Oregon
Posts: 175
 

Default

Yes, as jhug talked. You can have a very simple shell scripts with just couples of line to call the job A and then job B. Use cron job to run this script.
__________________
Carts n Tools.com
- New Root HTML Generator
- Templates | Add-Ons | Services
- XCart 4.0.x
Reply With Quote
  #4  
Old 12-05-2004, 11:37 PM
 
xcell67 xcell67 is offline
 

Senior Member
  
Join Date: Dec 2003
Posts: 149
 

Default

thanks for the responses guys. I just ended up putting the two functions I wanted in the same php file, and just set up the cron to run that file.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:36 PM.

   

 
X-Cart forums © 2001-2020