Deadlinecommand arguments evaluation error on Linux

Hi,

I have no problem with the following command in a Windows command prompt :

deadlinecommand -submitCommandLineJob -executable /bin/bash -arguments “-c ls”

However, on Linux, in a terminal, it seems like the double quotes are ignored and deadlinecommand tries to find out what to do with “ls” instead of treating the arguments as a single string :

[chris@chrismachine ~]$ deadlinecommand -submitCommandLineJob -executable /bin/bash -arguments “-c ls”
Error: unrecognized argument: ls (System.Exception)

I tried many combinations of quotes and backslashes without any success, any idea ?

I have to assume this is a problem between Mono and Microsoft’s .net implementations.

It seems that my test Linux box is down and it’ll take a few working days to get access again. In the meantime, just to be clear, have you also tried with single quotes? (I think you have, but just making sure):

[chris@chrismachine ~]$ deadlinecommand -submitCommandLineJob -executable /bin/bash -arguments '-c ls'

If that doesn’t work, you might be able to work around the problem by putting your command in a script that’s accessible by all machines, then provide the path to the script. Not ideal for quick testing but it’d work around this problem.

I have tried indeed with many types of writing, using simple quotes, backslashes for spaces, etc… Nothing that seems to help.

Since I might be missing something useful, could you tell me if the exact same thing would be possible through the Python API ? Rather than having extra files written I’d rather explore full commands ways.

Thanks!

It is possible from the Python API. Alternatively, you can run directly via the REST endpoints the Python API wraps:

The Standalone Python API has an example at the bottom of the landing page.

In both cases you’re providing dictionaries of values.