941 questions
1
vote
0
answers
88
views
Powershell script using Microsoft.Graph in Task Scheduler - prompt for login every time its executed
I'm trying to run a ps1 script using Task Scheduler. The script uses Connect-MgGraph from Microsoft Graph PowerShell SDK and the Azure app has delegated permissions. While testing the script manually,...
1
vote
0
answers
64
views
How to connect to Remote PC to read Task Scheduler Status for each job?
I have two PCs that I am trying to connect so I can look at each Task Job Status in Task Scheduler.
So I was able to use following code:
public void Taskreader(string machineIP, string user, string ...
1
vote
1
answer
109
views
ps1 script not performing consistently with task scheduler
lets say I have a myScript.ps1 file, that at some point needs to run native commands/binaries. its content is:
set-content -path "c:\temp\test.text" -value "hello world"
. 'C:\temp\...
0
votes
1
answer
215
views
Windows activates task before user logon although trigger is set as "At log on"
I want my Win11 c# program to get activated automatically when user logs in.
I didn't find anything documented for this behavior, but I verified using logs that Windows is running the program very ...
0
votes
2
answers
71
views
Notification after shut down on windows using python
I want to create a function that displays a message for the user when windows start again after a shutdown.
It is used together with the shutdown command shutdown \s \hybrid
Heres my attempt with the ...
0
votes
0
answers
17
views
How to create a task that will be launched when any user logs in Windows
I have the following xml file which defines the settings for a windows task.
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://...
0
votes
0
answers
335
views
Windows Scheduler Task missed start task rejected mechanism
Can someone explain to me the mechanism of how the Windows Scheduler Task checks for a "missed task start rejected"? This morning, when I checked the scheduler task history, I saw a warning ...
0
votes
2
answers
189
views
How to keep queue:work running continuously in Windows Task Scheduler even when the job queue is empty?
I’m working with a Laravel project and I need to run the php artisan queue:work command continuously, even when there are no jobs in the queue. I have already set up a Windows Task Scheduler task to ...
-1
votes
1
answer
86
views
Why does a batch file work fine on execution with double click but fails on execution as scheduled task?
I am using the following as a backup for all open folder windows when Windows crashes. It works well when I click on it in Windows File Explorer. It creates the batch file foldersession.bat that can ...
-2
votes
1
answer
75
views
Task Scheduler not running after restart of VPC
I have 1 app that runs 24x7. I have configured Task Scheduler Task to Run the App at Logon and At Startup for Any User.
This all works perfectly on PC. But on VPC the system was restarted and the App ...
0
votes
0
answers
352
views
How to capture Task Scheduler logs from Event Viewer remotely
I am looking into capturing the event levels with information whether they are information/error/warning. So, I started to look into the WMI to access the PC remotely and it was able to connect to the ...
0
votes
0
answers
288
views
Invoke-Sqlcmd is not available from within powershell script
I am not able from within .ps1 script call function Invoke-Sqlcmd.
This script is:
Install-Module -Name SqlServer
Invoke-Sqlcmd -ServerInstance "SQLSERVER\" -Database "MYDB" -Query ...
0
votes
1
answer
76
views
Is there a way for python to update an excel slicer in non-interactive mode?
I have a python script that refreshes data connections, updates slicers and filters.
I'm using pywin32 to update my excel file. As I understand, updating excel slicers and filters requires COM ...
0
votes
1
answer
90
views
Curl - Call endpoints in pairs not one by one
I have my scripts endpoints running on localhost(http://127.0.0.1:5001).
What I have:
What I currently do is calling those scripts (endpoints) one by one in a loop from .bat file (I use windows task ...
0
votes
1
answer
159
views
Schtasks - Error: The parameter is incorrect. (14,8): UserId:
I am working on a script to automate the ability to use schtasks to test managing remote Windows Scheduled Tasks. I have a specific test task that I created on another server. I am able to query ...
1
vote
1
answer
71
views
Schedule task on Second Sunday of the month or on Third and Fourth Sunday and Saturday
I'm using C# and Microsoft.Win32.TaskScheduler.dll to create dynamic scheduled tasks.
No problem to set a date for a specific scheduled Month date :
TaskService ts = new TaskService();
TaskDefinition ...
0
votes
1
answer
288
views
Powershell: set new task under taskscheduler from Intune
I need to use powershell script to set schedule task. The test users has an admin rights and running manually works on user's test pc, creates the scheduled task.
However the other users doesnt have ...
-1
votes
1
answer
236
views
How to skip winSCP asking for credentials in automated script?
I am new to using winSCP and Windows Task Scheduler. I am working on connecting to an external FTP server and copying its contents to a local directory on my PC.
When running my scheduled task, winSCP ...
0
votes
0
answers
87
views
How do I monitor Windows Scheduled Task for failure through console c#?
My requirement is
For a specific Task, I need to get these details:
1.Last started Datetime and Last Completed Datetime
2.Errors details if any within this instance.
3.Events details.
This code I have ...
0
votes
1
answer
123
views
How to run a task on windows 11 session opening ... but only once a month
I need a task to be performed once a month.
BUT
I cannot use the trigger "start the task every 1st of month at 8:00" (for example) because, maybe, the computer won't be turned on at 8:00 for ...
0
votes
1
answer
128
views
Schtasks does not provide full access to the program
I wrote a small code in C, and want to try to run it through Schtasks. It started, but a winapi function, which requires administrator rights, did not work.
For cmd, I use this prompt (I launched it ...
0
votes
0
answers
32
views
PowerShell script fails when run through Windows Task Scheduler on one machine
We have one machine where running a task in task scheduler doesn't work.
It's running a PowerShell script that checks for write protections on a excel file and the runs a macro. If I run the script ...
0
votes
0
answers
129
views
Python script in "Task Scheduler" runs forever
I can't figure out why my Python script works perfectly in the console when I execute it like this (runs for 1-2 seconds):
But if I run it in the task scheduler (either manually or at the scheduled ...
0
votes
1
answer
38
views
Cannot launch an executable from a .ps1 itself being lunch from the Windows Task Scheduler
I created a .ps1 file that verify if a process is running and if not, it launches the program. This .ps1 file is launched every 10 minutes by the Windows Task Scheduler. I cannot use the Task ...
0
votes
0
answers
171
views
Windows Task Scheduler & Selenium run issue
I am using Selenium to do some key clicking to choose a specific VPN from the VeePn Extension for Chrome.
Everything works fine when I run the Python script manually, because it opens up the browser.
...