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.
Related
I have a strange situation. I've caused strange situations before, but now it's happening to me. I have a .txt file ( log.txt) being created on a server drive and I don't know where it's coming from.
The contents of the .txt file say the actual date and the actual time an application process ran, but this the format of what's in the .txt file:
(date) (time) AM Starting Job: (date) (time) AM
I've checked a number of things to try to see what's causing this. I have identified a SQL Server Agent Job that runs at that specific time. It runs a SSIS package. Part of that package runs a PowerShell script that starts 16 processes of an application.
The txt file is defiantly showing data of when the PowerShell script is executing the 16 or so Start-Process's in that script.
The agent job doesn't have any steps to create such a file
The SSIS package doesn't have logging turned on. (Right-click the screen in Visual Studio > logging.)
There are no tasks on the project to create the .txt file in the SSIS project.
An application is running a process on part of this and I think that's what's creating it, but the developer doesn't think it's the app creating it.
Is there anything else I should check to see what's generating this?
I found the answer by using SysInternals > ProcMon. I scheduled the job at a time where I could start ProcMon and monitor the creation of the file. In this case, it was the tool I thought it was. The developer fixed the issue.
In case anyone else would like to learn more about SysInternals, here are a few links:
Info on SysInternals:
https://learn.microsoft.com/en-us/sysinternals/
ProcMon:
https://learn.microsoft.com/en-us/sysinternals/downloads/procmon
Video on how to find issues from the creator of SysInternals:
https://channel9.msdn.com/Events/Ignite/2016/BRK4028
I have a Azure Automation Runbook written in Powershell. It takes a SQL DB every week and creates a backup to blob storage. This has been working for over a year and abruptly stopped producing .bacpac files to blob last month.
Nothing appears to be wrong with the code as it has not changed and running it in the test pane with the proper parameters, which have also remained unchanged, completes successfully. When the scheduler calls the job, the runbook is called and runs with no errors or warnings, just does not produce the .bacpac file to blob storage.
Has anyone run into this problem or similar? I am looking for suggestions on where to be checking within portal, sql or wherever to resolve this issue. I cannot seem to find the problematic moment via activity log.
Running a Cmd.exe inside an ETL Process Task and it's failing with Exit code 1.
If I run the command as the same user I'm running the SQL Agent job as outside of the ETL it's running fine and giving Exit code 0.
I've seen some DCOM errors in Event Viewer and Ive taken steps to give permissions to the user I'm running the ETL through the SQL Agent Job for. However it's still failing.
Are there other things I should check about running a CMD command across servers as a specific user?
Just to say this was a permission issue ultimately for it to write a file inside the Default folder. It wasn't manifesting as such until I dumped out the Log a little more. I had to make the user I was running the agent job to be a part of the Administrators group on the SSIS server to allow the process to work.
i have created a task with the Task Scheduler on my Windows 2008 R2 Sever.
It opens a .bat file. This bat has no errors and works fine.
If I start the task (i.e. by clicking on run) it executes the bat file.
From now it should repeat every x minutes (currently set to 1 minute) but it does not.
I tried a lot and changed almost every property but it still does not repeat executing my bat file.
I have read different questions and answers but nothing worked.
Has anyone an idea what I am doing wrong?
Thanks!
Björn
It seems like the error was about the "begin"-property of the trigger. It was set to "When task is created/modified".
I changed it to a one time event.
Things work fine now.
I have a Windows service that is basically a job scheduler. When a job is supposed to be triggered it reads some parameters from an Sql Server database and runs an exe file.
In order for the service to read from the database I have to change my service properties to log on as another account who has access to the database. So I have to change my local account to an account e.g. john.smith#myserver.com with password=123
Things seem to be working fine, except when I leave the computer at night and a job is supposed to be run e.g. every hour. The morning after when I log on, I see that the jobs are successfully triggered but for each run of the job there is a new instance of the exe file in my processes. And I have to close all those instances. This obviously is not my desired behavior.
Does anything change when windows is in Locked mode? And either way, why the new instances of the program remain in task manager. Not to mention, the exe files are automatically closed whether they do their job correctly or not.
If you run the EXE from the command line, does it require any kind of keyboard input? Is it asking for parameters? Does it say something like "Press any key to exit"?