I am trying to find a way to create a desktop application where I can setup Tasks to run that will turn on my pc and run a c# app / shell script that will send an api request with a video file and a text file.
Question posted in React native
The official React Native documentation can be found here.
The official React Native documentation can be found here.
2
Answers
If you use nodejs, you can execute commands in the terminal with the exec function from the child_process module, then use the
schtasks
command to schedule tasks.Commands with nodejs:
https://stackabuse.com/executing-shell-commands-with-node-js/
schtasks command:
https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/schtasks
I am unsure about turn on PC part.
You could write a Windows Service worker that runs in the backend, then interact with it vai a local datasource (like a Database or Text file) from your react native desktop app.
In the .Net world you could also host a HangFire web site or something like it. To expose API endpoints for your application to fire off jobs or series of jobs.
https://www.hangfire.io/
Or:
You should be able to call a PowerShell script.
*** Addison Schmidt answer it likely much more direct. Depending on your needs.