X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Help with Cron Jobs (https://forum.x-cart.com/showthread.php?t=10724)

xcell67 12-03-2004 12:06 PM

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)

jhug 12-03-2004 09:34 PM

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.

Yang Xu 12-04-2004 01:37 AM

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.

xcell67 12-05-2004 11:37 PM

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.


All times are GMT -8. The time now is 02:48 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.