Share via

Task scheduler not executing executable file properly

Anonymous
2024-11-01T15:14:37+00:00

I am executing a bat file which is calling a power shell script.

Power shell script is doing the below activity.

Step1: It truncat the table and insert it from the file present in the server.

Step2: execute the executable file.

Step3: create the file and archive it in the server.

I am running with high privilege.

Frequency of the task scheduler is every 10 min for each day.

Issue

Every 10 min file is creating but when I check the executable logs then some time it run and some time not.

Even if I trigger the task scheduler manually then some time

it trigger successfully which create the file and also execute the executable but sometimes it only create the file but executable file not even triggered.

When I check the event log then it is showing permission or path issue.

Although path and permission are there.

We are in windows 22 but running the task scheduler in windows 8 instance

*** Moved from Windows / Windows 10 / Settings ***

Windows for business | Windows Client for IT Pros | User experience | Remote desktop services and terminal services

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2024-11-04T02:12:53+00:00

Hello,

If the permission and path issues were consistent, the task would fail every time. The intermittent nature of the issue suggests that there might be other factors at play.

Here are a few things to consider:

  • Monitor the CPU and memory usage during the scheduled times. High resource contention can cause tasks to fail or behave unpredictably.
  • If the script or executable relies on network resources, check for network latency or connectivity issues.  Ensure that DNS resolution is consistent and there are no issues with resolving hostnames.
  • Ensure that the task is set to run even if the user is not logged on and that it stops if it runs longer than a specified time.
  • Check "If the task fails, restart every" to automatically retry the task if it fails.
  • Check the Windows Event Viewer for any related events, particularly in the Application and System logs.

I hope this information helps.

Best regards,

Karlie Weng

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful