Windows 10: execute a .js file using Task Scheduler

Discus and support execute a .js file using Task Scheduler in Windows 10 BSOD Crashes and Debugging to solve the problem; Hello.I have a JavaScript file that I execute it with node using cmd or VS Code.I have tried to schedule a task using:Action: Start a programProgram/... Discussion in 'Windows 10 BSOD Crashes and Debugging' started by Alexandra Burlacu, Aug 9, 2022.

  1. execute a .js file using Task Scheduler


    Hello.I have a JavaScript file that I execute it with node using cmd or VS Code.I have tried to schedule a task using:Action: Start a programProgram/ Script: "C:\Users\AppData\Local\Programs\Microsoft VS Code\Code.exe"Arguments: -l - i -c "C:\Users\desktop\folder_containing_the_file; node writeToFile.js"When I run it, it opens my VS code, but is not executing the file.What should I do to be able to run the script?Thank you.

    :)
     
    Alexandra Burlacu, Aug 9, 2022
    #1
  2. jgunning Win User

    Task Scheduler Batch file

    Hi all,

    Looking for some help.Im creating a batch file to run for different users to add a scheduled task. HOWEVER - the whole thing works great and has done for some time.But after i run the batch file on each machine (different users) i have to go into the security options and change the user the task runs in to the unique user of that machine. Is there a way to use the batch file to pull the account name of the machine (or computer name) and use that as the user the task runs in?


    Thanks =)
     
    jgunning, Aug 9, 2022
    #2
  3. Task Scheduler Email Issue

    Not at all. I suggested in my previous note that you could schedule this AutoIt script:

    1. Take a screenshot
    2. Save it to a temporary file
    3. Generate an E-Mail
    4. Attach the screenshot
    5. Send it to its recipient
    Do you think that AutoIt is unable to execute each of these steps?
     
    Frederik Long, Aug 9, 2022
    #3
  4. execute a .js file using Task Scheduler

    Task Scheduler with error message The selected task »CreateChoiceProcessTask« no longer exists

    Hi,

    Thank you for posting your query on Microsoft Community. Let me assist you.

    I suggest you to clear the task from Task Scheduler using the below steps and check if the issue still persists.

    Steps:-

    • Type Task Scheduler on Search bar.
    • Click on Task Scheduler Library.
    • Select the particular task and right click on it.
    • Select End.

    Hope this information is helpful. Please do let us know if you need further assistance, we’ll be glad to assist you.
     
    Pawan Dhondiyal, Aug 9, 2022
    #4
Thema:

execute a .js file using Task Scheduler

Loading...
  1. execute a .js file using Task Scheduler - Similar Threads - execute file using

  2. Task scheduler not executing executable file properly

    in Windows 10 Gaming
    Task scheduler not executing executable file properly: 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...
  3. Task scheduler not executing executable file properly

    in Windows 10 Software and Apps
    Task scheduler not executing executable file properly: 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...
  4. Task scheduler not executing executable file properly

    in Windows 10 Customization
    Task scheduler not executing executable file properly: 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...
  5. Issue with Task Scheduler to execute .exe file

    in Windows 10 Gaming
    Issue with Task Scheduler to execute .exe file: I have created one Task to execute .exe with Task Schedular. So when i am trying option " Run only when user is logged on" its working fine but when i am trying to use "Run whether user is logged on or not" it not working, which is strange. I tried with user having Admin...
  6. Issue with Task Scheduler to execute .exe file

    in Windows 10 Software and Apps
    Issue with Task Scheduler to execute .exe file: I have created one Task to execute .exe with Task Schedular. So when i am trying option " Run only when user is logged on" its working fine but when i am trying to use "Run whether user is logged on or not" it not working, which is strange. I tried with user having Admin...
  7. Issue with Task Scheduler to execute .exe file

    in Windows 10 Customization
    Issue with Task Scheduler to execute .exe file: I have created one Task to execute .exe with Task Schedular. So when i am trying option " Run only when user is logged on" its working fine but when i am trying to use "Run whether user is logged on or not" it not working, which is strange. I tried with user having Admin...
  8. execute a .js file using Task Scheduler

    in Windows 10 Gaming
    execute a .js file using Task Scheduler: Hello.I have a JavaScript file that I execute it with node using cmd or VS Code.I have tried to schedule a task using:Action: Start a programProgram/ Script: "C:\Users\AppData\Local\Programs\Microsoft VS Code\Code.exe"Arguments: -l - i -c...
  9. execute a .js file using Task Scheduler

    in Windows 10 Software and Apps
    execute a .js file using Task Scheduler: Hello.I have a JavaScript file that I execute it with node using cmd or VS Code.I have tried to schedule a task using:Action: Start a programProgram/ Script: "C:\Users\AppData\Local\Programs\Microsoft VS Code\Code.exe"Arguments: -l - i -c...
  10. GPO for Scheduling Tasks not executed

    in Windows 10 Customization
    GPO for Scheduling Tasks not executed: Hello, I should make GPO to change one wallpaper at 07:00 AM and change other wallpaper at 03:00 PM. I have made two bat files. I want to execute them with schedules tasks via GPO. My DC is Windows Server 2008 R2 Standard, The client PC is Windows 10. My bat file content...