Jade Triggerring External File in Linux
Posted: Fri Aug 07, 2009 12:56 pm
by Scott Sheng >> Sun, 22 Jan 2006 5:16:18 GMT
I am facing a problem for Linux system integration. Currently, after a Jade Linux System generates a csv file, it will trigger a startnotify_pos.sh. This *.sh file will execute another notify_pos.php file to send the csv file to another Linux server (Server B) within the same network. However, now, after the csv file is generated, the startnotify_pos.sh/notify_pos.php file is not triggered successfully.
Pls note that it has nothing to do with file permission as both my startnotify_pos.sh and notify_pos.php are with full permissions (user, group, owner execution, read, write are true).
I use createExternalProcess method to trigger the startnotify_pos.sh and write its return value, this method will show the Jade Interpreter Output Viewer to show whether the file is triggered successfully when csv export finishes.
For the first time, I have a terminal opened (PuTTY) on my pc. Then I export the csv file. The Jade Interpreter Output Viewer shows that startnotify_pos.sh is triggered successfully, and in the terminal window I saw the php file being run (it shows the integration folders being processed). The file is transferred to Linux server B successfully. However, it seems that the php file did not end and did not return back to [root@JadeLinuxServer root]#. Then I close the PuTTY session.
After closing, I tried exporting csv file again. This time, the csv file is created in the integration folder in Jade Linux server, and Jade viewer shows that startnotify_pos.sh is triggered successfully, but the csv file is not sent to POS server. I doubted that php file needs a terminal to run, so open a permanent terminal at Jade Linux server, however, still unable to send the file over to Linux server B.
I've also tried using notify_pos.php only, but still the csv file is not sent over Linux Server B. If there's a necessary to change notify_pos.php into a *.sh file? Or our solution for this case is correct way?
Does anyone have any idea?
Thanks
I am facing a problem for Linux system integration. Currently, after a Jade Linux System generates a csv file, it will trigger a startnotify_pos.sh. This *.sh file will execute another notify_pos.php file to send the csv file to another Linux server (Server B) within the same network. However, now, after the csv file is generated, the startnotify_pos.sh/notify_pos.php file is not triggered successfully.
Pls note that it has nothing to do with file permission as both my startnotify_pos.sh and notify_pos.php are with full permissions (user, group, owner execution, read, write are true).
I use createExternalProcess method to trigger the startnotify_pos.sh and write its return value, this method will show the Jade Interpreter Output Viewer to show whether the file is triggered successfully when csv export finishes.
For the first time, I have a terminal opened (PuTTY) on my pc. Then I export the csv file. The Jade Interpreter Output Viewer shows that startnotify_pos.sh is triggered successfully, and in the terminal window I saw the php file being run (it shows the integration folders being processed). The file is transferred to Linux server B successfully. However, it seems that the php file did not end and did not return back to [root@JadeLinuxServer root]#. Then I close the PuTTY session.
After closing, I tried exporting csv file again. This time, the csv file is created in the integration folder in Jade Linux server, and Jade viewer shows that startnotify_pos.sh is triggered successfully, but the csv file is not sent to POS server. I doubted that php file needs a terminal to run, so open a permanent terminal at Jade Linux server, however, still unable to send the file over to Linux server B.
I've also tried using notify_pos.php only, but still the csv file is not sent over Linux Server B. If there's a necessary to change notify_pos.php into a *.sh file? Or our solution for this case is correct way?
Does anyone have any idea?
Thanks