Is there a way to list all the running talend jobs in the server?
I'm currently relying to yarn management to check.
Appreciate all your help.
each talend job runs a process on jvm, so either ps aux | grep java or jps should give you this, you can then change the grep part of this and create a bash script / cron job this to automate as required
Related
I do have following setup:
a win PC with gitlab-runner installed (working)
a powershell script running on the same PC is starting an application
a gitlab server to connect this local PC and starting the powershell script
Now when starting the powershell script directly from the local PC, the application starts and terminates after done - working as expected. When starting the same powershell script with the gitlab server (yml-file) then I can see that the application has been started (new process in taskmanager) but it is not running as well it never terminates.
When manually end the task I see that gitlab terminates again.
Question:
what could be the root cause?
is it possible to run the powershell script with gitlab-runner? I think there is a way with the command "exec". How does the command looks like when calling the powershell script?
is it possible to run the application not in the background in order to see whats going on?
others?
thanks in advance
I think there is a bug with the gitlab runner on windows.
No matter which shell you configure in the config.toml the runner
will always use cmd.exe for an exec local run.
Specify the --shell argument to override the default cmd.exe shell:
> gitlab-runner exec shell your_job --shell pwsh
If you run this locally in your project, it outputs to .builds/, so add this to your .gitignore because git will see it and think you might want to add a submodule.
What is the best way to execute Appium server in Azure pipelines console using Microsoft hosted agent? Or is it even feasible? I´m using vmImage: 'vs2017-win2016'
I´ve managed to start the server with Cmdline and powershell script but I´m unsure if the server is actually running in the background.
So far I´ve tried -
Plain Cmdline script. "appium -p 4723". This starts the server but stays in the Cmdline job forever.
Plain Cmdline script with start call. "start appium -p 4723". I believe this would start Appium in another console, but I´m usure if the server keeps running in the background. Cmdline job passes to the next one. I don´t see the standard purple Appium server launch commands.
Powershell Start-Process command. "Start-Process appium -p 4723". Same impact as with 2.
Is there a way to verify that appium server exists?
I´m trying to achieve mobile app automated testing using Azure Repo&Pipelines, Robot Framework, Appium and Android studio emulator. For this purpose, I need Appium server running in the background. I´m doing the needed tool installations in my pipeline before entering to Appium running stage.
Is there a way to verify that appium server exists?
Try command like TASKLIST /FI "IMAGENAME eq cmd.exe" /V.
For me, I use three cmd scripts (CMD task) to do the test, task1 => npm install -g appium, task2 => start appium -p 4723, task3 => TASKLIST /FI "IMAGENAME eq cmd.exe" /V. And here's the output of task3:
Since the cmd.exe will be killed when the task is done, so cmd.exe(task1) and cmd.exe(task2) doesn't exist.
Till the third task, only the newly created console (appium -p 4723) and the cmd.exe(task3) do exist. And the appium -p 4723 is what you want, it do exist in background if we don't kill it.
Note:
1.I used the second command start appium -p 4723 to test. It's expected behavior that your first command would start the server but it stays in the Cmdline job forever. Azure Devops pipeline won't go to next task, if current task hasn't completed. So if the cmd task is one listener that keeps running, it stays in the Cmdline task forever till timeout.
Second command is better in Azure Devops pipeline environment.
2.What you use is microsoft-hosted agent, it will be recovered when the pipeline is completed. So your appium listener will be killed after the the job/pipeline completes.
3.About Appium test in Azure Devops, you can check this document.
with powershell command, I can start appium, try below code:
- powershell: Start-Process appium -PassThru 4723 displayName: "start appium process"
After starting the appium server in azure devops, it cant execute the next task. I want after starting the server, next task will be executed.
I am using the community version of pentaho 7.0. I have a repository in a db postgres but I don't know how to schedule a task executing the jobs directly from the repository. I can only do it with pan.bat or kitchen.bat from a local path.
Can you help me please!
I usually create a BAT file and then schedule it by task scheduler.
Below is a sample which I use for the BAT File.
C:\data-integration\Kitchen.bat"/rep:"TEST" /job:"TEST_JOB" /dir:/TEST /user:admin /pass:admin
Try to write a shell script or batch script and schedule it through crontab or windows Scheduler.Use the below links for Linux and Windows Scheduler.
https://linuxize.com/post/scheduling-cron-jobs-with-crontab/
https://windowsreport.com/schedule-tasks-windows-10/
i have an open-source program i want to run from ansible basically ansible will go into the node and run "./Program.Name" which will start the program but when ansible-playbook is done the program closes is there a way I can start the program and keep it running even after ansible is done? I was told there is the async module but how can I write the playbook so it will keep the program running for as long as the node is up. Please try to provide the yml code if possible where I can replace the name of the program and it should do the job
I have tried to run the porcess with "./Program.Name &" but it does not stay running.
The following methods may be useful to you, and the async and poll parameters are necessary,more info see ansible doc
- name: run
shell: "( tail > /dev/null 2>&1 &)"
async: 10
poll: 0
Note: If you want to run the program with a daemon, I think supervisord may be more appropriate.
async poll = 0
just never check back in on the task
https://docs.ansible.com/ansible/latest/user_guide/playbooks_async.html#concurrent-tasks-poll-0
I want to schedule a job to run every 5 minutes. but the question is that
Is there a way (like creating a crontab) to prevent a job from running, when the previous job has not been completed?
You can write a shell script to start the job only when the job is not already running. Configure the shell script in crontab every 5 minutes. this will ensure that the execution happens only when there is no instance of the job running already. This is how i have done for my cron jobs
Note : make use of ps -ef | grep commands in your shell script to identify if there is a process already running