in reply to Re: triggering a program in web server in thread triggering a program in web server
Probably the reason why choosing synchronous execution (script A calls script B) or asynchronous is how much time B takes and how you want to handle B's errors. In a synchronous environment you may report B's error to the user (say, destination server is down) and abort the process. If B is expected to be quite fats (say less than a few seconds) handling B synchronously is probably both easier and sensible.
If B runs in 'daemon mode', ie as a daemon or using repeated sleep's, you'll have to handle B's errors anyhow using a log or something.
My $.02
|