| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Help with Cron Jobs | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
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) |
|||||||
#2
|
|||||||
|
|||||||
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.
|
|||||||
#3
|
|||||||
|
|||||||
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 |
|||||||
#4
|
|||||||
|
|||||||
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.
|
|||||||
|
|||
X-Cart forums © 2001-2020
|