Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to redirect output from command line #48

Open
gauthier12 opened this issue Aug 9, 2023 · 2 comments
Open

Unable to redirect output from command line #48

gauthier12 opened this issue Aug 9, 2023 · 2 comments

Comments

@gauthier12
Copy link

gauthier12 commented Aug 9, 2023

Hello.
I would like to redirect the output of my command launched by task-spooler.
I've seen comments using stdout redirection of the job but I haven't been able to use it.
I use ts "./test.sh > test.log but the output is still stored in a temporary file in /tmp.
I've tried with a absolute path and with the tee command and still nothing.
The -o file option still output with a random suffix in /tmp.
The only way I've found is to create a temporary script and redirect the output from inside the script.
Is there something I am missing ?
Cheers

@justanhduc
Copy link
Owner

Hey @gauthier12. Sorry for the late reply. The way I see it, you need --set_logdir first and then use -O for the output file. Or am I missing something?

@gauthier12
Copy link
Author

Hi,
thanks for the response. The -O option still add a random name on the file and the --set_logdir change the server environnement so I'm not sure but the --set_logdir option can change the output directory of previously queued job still pending.
I've got a workaround by patching execute.c to output in the current directory and without the random part but I would prefer to work with the common redirection in the command line ( ts "./test.sh > test.log" ), it would be simpler for my users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants