Plesk Scheduled Tasks - Deny: Previous script did not finished yet - plesk

I had a script added to the Plesk's scheduled task, then, I removed it from the scheduled task, but it was still running in background and using lots of CPU, so I killed it via shell htop, Now I am trying to add that script back to the scheduled task again, But when I run it I am getting following error
Deny: Previous script did not finished yet
I have tried deleting the entries from "longtasks" table via a shell command
plesk db "delete from longtasks"
But that didn't work.
I have the following version of Plesk and operating system on my server
Plesk Version: Onyx 17.8
Operating System: Ubuntu 16.04 Server LTS
ScreenShot of error
please Let me know if anybody have any suggestion, Thanks!

Looks like the script is finished properly, as far as Plesk concerns, while Deny: Previous script did not finished yet message is the output of the script itself.
Try running it manually to make sure, and then review its's content to fing why it is not executing as expected.

Related

Execute process task fails to execute Rust script in job

I have written a small Rust script for an import job. I added the script execution into the SSIS package through the Execute process task and set the correct working directory. Using the debugger, the script works without a problem, as it does when executed normally, e.g. through cmd or PowerShell.
When I start the job in SSMS as an Agent Job, the package fails with
The process exit code was "-1073741515" while the expected was "0".
What I tried
Replacing the script with a very basic Rust script that just writes one single line to a file in the working directory to exclude the possibility that the script somehow panics, but still nothing.
The script is compiled with the i686-pc-windows-msvc toolchain. With 64bit the script does not work at all on the server.
Permissions look okay for the executing and the working directory. Full control for both folders.
Since execution works on the server I think this should most likely be a permissions issue but I can't for the life of me not figure out what is wrong.
Okay the problem was indeed with the default SQL Server Service Agent-account that ran the job. If I run the job with a Proxy-account it runs fine.
I'll have to look into the configuration of the Service Agent but until then, Proxy account it is.

Exe running as a Service instead of a Application

Situation
I have a Win 2012 server in which i run an exe which is essentially a GUI. The server restarts every monday so on monday morning i have to log-on to the server using a generic account and manually start the exe.
Setup
I am planning to automate the activity of starting the exe every monday. For that i have written a batch file which starts the exe with some parameters. Also i have created a scheduled task that runs on Monday and triggers the batch file. The trigger that i have used in the scheduled task is "At Startup".
ISSUE
The issue that i am facing is that after the server is restarted i am not seeing my GUI(exe) running. When i checked on the Task Manager it is showing it running as Background Process however it is not coming to front and i am not seeing the GUI. I might be wrong but i think the exe is running as a process/service instead of running as an App.
Can someone please suggest a solution for this issue.
Thanks in advance.

Microsoft Release Management timeout during deploy step

We're using Microsoft's Release Management to deploy our web application to our test environment (QA). It is a straight-forward MVC.Net web application. Our build generates a web deploy package and we have a command script that sets some parameters based on the target environment (QA is just the first step), and then runs the standard Web Deploy command line tool. The command script works without errors when run from the command line outside of Release Management.
When we move this process into Release Management using the command-line tool, we encounter a timeout during the deploy step of the workflow. The error is:
The installation command \"powershell -command ./RunCommandLine.ps1 -FilePath 'Deployment\Deploy.cmd' -Arguments '/T:QA /E:intranet' -UserDomain 'domain' -UserName 'username' -UserPassword '*****'\" reached the configured timeout (2 minutes); the process was terminated.
We've checked the output log and there is no information from the script at all. We have echo commands in the beginning that should at least dump some output to the log before any action is taken.
The interesting thing is that when we click the "Retry failed deployment" button, the retry succeeds in about 15 seconds without any issues. This happens for each release - fails with timeout, retry succeeds in 15 seconds.
Any ideas from any release management gurus is greatly appreciated.
In release management , what deployment steps have you chosen ? i am assuming a powershell command ? can we do it using a xcopy ( works for me). Also i would request you do follow this blog on debugging the release mangement agent. opening the agent in debug mode has solved my problems or atleast told me about my problem most of the times. http://blogs.msdn.com/b/visualstudioalm/archive/2013/12/13/how-to-enable-detailed-logs-and-collect-traces-from-various-release-management-components.aspx

task in task scheduler failing when executing batch file

I have a task set up on a windows server 2008 R2. This task is setup in the task scehduler to execute a batch file that backs up a mongo database, every 4 hours. I have it set up the same on 2 servers.
On 1 server it runs fine.
On the other, I get this error logged in the history and it doesn't execute.
Task Scheduler failed to start "\Backup MongoDb" task for user "*****". Additional Data: Error Value: 2147750687.
I am lost for ideas what the issue may be. Anyone got any ideas?
My workaround is to call a .BAT file from the Task Scheduler.
This batch file then calls the PowerShell script file:
powershell c:\dir1\AutoPopulate.ps1
Seems to work.
I have run into this a few times. Check the last run result on the task. If it says another instance is already running, right-click on the task and click "End." Then after it ends the task it should start again correctly the next time. You can also right click and choose "Run" to run it immediately.
Check the Security options of your Task.
Make sure, the option Run whether user is logged on or not is selected.

CakePHP Shell "could not start" from Scheduled task and Windows 2003 Server

I am trying to run a CakePHP Shell script through the Scheduled Task of Windows 2003 server and I'm finding that the task Could not start.
When I run it manually from the Command Prompt it works well:
C:\Inetpub\wwwroot\CakePHP\lib\Cake\Console\cake mail read
The Scheduled task Run field is exactly the same and the Start in is set to:
C:\Inetpub\wwwroot\tickets\app
The Run as field is set as the computer admin which has all permissions (not the ISS user)
Scheduled Task log shows this message when trying to execute it:
"Ticket Mail System.job" (cake) 13/12/2012 07:15:00 ** ERROR **
Unable to start task.
The specific error is:
0x80070005: Access is denied.
It seems it is a permissions problem.
I have tried to give over the lib/Cake/Consol/cake.bat file all permissions for both users, the IIS 6 user and the Internet Guest Account user, but still doesn't work.
Any idea which could be the cause?
It worked well over Windows 7 but it didn't on Window 2003 Server.
Finally, I tried it adding .bat after calling the Shell and it works.
I had to put this in the Run field:
C:\Inetpub\wwwroot\CakePHP\lib\Cake\Console\cake.bat mail read
It seems Windows 2003 needs the .bat at the end...
I found it at: http://www.geekyboy.com/archives/376
Thanks guys, this got my issue solved.
found that my ".bat" file instead had the extension ".CMD" which seemed to work fine up until now.
fixed it by renaming the file extension and changing the directory in the task scheduler.(because it still had the ".CMD" extension.

Resources