|
Publicité ' | |||||||||||||||||||||||
|
|
#1 | ||||
|
Membre du Club
![]() Inscription : décembre 2005 Messages : 48 ![]() |
Bonjour,
Je cherche à lancer un script shell en arrière plan via xp_cmdshell. C'est à dire que la procédure xp_cmdshell doit rendre la main sans attendre la fin du shell. J'ai fais un test en appelant avec xp_cmdshell un shell 1 qui lui-même appel un shell 2 en arrière plan, et même là, le xp_cmdshell attend le retour du shell 2 alors que le shell 1 a déjà rendu la main. Merci. Lancement via xp_cmdshell : code sleep_run.sh : Code :
Code :
|
||||
|
|
00
|
|
|
#2 |
![]() ![]() |
Lire la documentation devrait aider :-)
Je cite (page 611 de sprocs.pdf de ASE 15): Syntax: xp_cmdshell command [, no_output ] [ return_status | no_wait ] ... no_wait if specified, the xp_cmdshell operation immediately returns to the caller and the specified command executes as a background process. You see no output, and the returned result reflects only the success or failure of starting the command as a background process, not the success or failure of the process itself. J'avoue que je ne l'ai jamais essayé - je ne suis pas un grand fanatique de xp_cmdshell (ou du XP server en général) - mais cela devrait avoir le comportement que tu souhaite. Michael
__________________
Michael Peppler Membre de TeamSybase - www.teamsybase.com "A successful [software] tool is one that was used to do something undreamed of by its author." -- S. C. Johnson |
|
|
00
|
|
|
#3 |
|
Membre du Club
![]() Inscription : décembre 2005 Messages : 48 ![]() |
Super, merci Michael.
J'aurais dû lire cette doc Cette nouvelle option m'avait échappé. Selon mes derniers tests, cette option est apparu quelque part entre la version 12.5.0.3 et 12.5.3. (apparemment non documenté dans les doc What's New et New Features). Franck. |
|
|
00
|
Copyright © 2000-2012 - www.developpez.com