Linux RunApp Script

The 1C:Enterprise developers forum

#1
People who like this:0Yes/0No
Just came
Rating: 0
Joined: Jan 16, 2018
Company:

Hy Everyone,

I have an issue about running a script from 1C installed on linux- CentOS

Now i'm trying like this: RunApp(MyScript. ScriptPath) - This doesn't work

My script works if is run from Linux Terminal.

It can be done another way? Or i'm doing something wrong?

Thank you!

 
#2
People who like this:0Yes/0No
Interested
Rating: 16
Joined: Dec 4, 2017
Company:

Dear Caramizaru Laurentiu,

Do you intend to run this script on the client or server side of 1C:Enteprise Platform?

What is the exact string you are going to pass to the RunApp method as the first parameter (CommandString)?

Best regards,
Vladimir Gurov

1C Company support team
 
#3
People who like this:0Yes/0No
Just came
Rating: 0
Joined: Jan 16, 2018
Company:

I run from Server side

l_lineFeed = "#!/bin/bash" +Char(10)+"tr -d '\r' <" +NewSDFUUID +".sh" +" > "+ SDFUUID +".sh";
Text = New TextWriter(l_ExecutabilFile+"/Text.sh", TextEncoding.ANSI);
Text.WriteLine(l_lineFeed, Char(32));
RunApp("Text.sh", Constants.BatPath.Get());

 
#4
People who like this:0Yes/0No
Interested
Rating: 16
Joined: Dec 4, 2017
Company:

Dear Caramizaru Laurentiu,

The point is that the RunApp method is not supported in server mode. Please refer to the documentation on the method.

Best regards,
Vladimir Gurov

1C Company support team
 
#5
People who like this:0Yes/0No
Just came
Rating: 0
Joined: Jan 16, 2018
Company:

"Thin client, web-client, server, thick client, Mobile application (client), Mobile application (server)" - This is what Syntax says

I use this function in 1C instaled on Windows and call it from server mode and work just fine.

 
#6
People who like this:0Yes/0No
Interested
Rating: 16
Joined: Dec 4, 2017
Company:

Dear Caramizaru Laurentiu,

Sorry for misleading you - the RunApp method was not supported in server mode in earlier versions of 1C:Enterprise Platform and is supported now.

We need extra time for investigation and preparing an answer for the issue you mentioned.

Best regards,
Vladimir Gurov

1C Company support team
 
#7
People who like this:0Yes/0No
Interested
Rating: 16
Joined: Dec 4, 2017
Company:

Dear Caramizaru Laurentiu,

According to your 1C:Enterprise script, the system writes the contents to a text file and then tries to run it as an executable file. The reason why the system cannot run it now is that the file has no "executable" attribute.

To enable the system run the file, you can do either of the following:


- Run:

RunApp("/bin/bash Text.sh", Constants.BatPath.Get());

instead of:

RunApp("Text.sh", Constants.BatPath.Get());



- Before running the Text.sh file, set its executable attribute:

RunApp("chmod +x Text.sh", Constants.BatPath.Get());
RunApp("Text.sh", Constants.BatPath.Get());


Best regards,
Vladimir Gurov

1C Company support team
 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.