Brian Kessler
Brian Kessler

Reputation: 2327

Is it possible for an Azure Function App in C# to execute a command line application?

I'm looking to create a Function App in C# with a timer trigger which will occasionally (e.g. once per day) manipulate our Salesforce environment. Specific tasks may (will) include:

  1. (Re)setting trace flags for Users and Apex Classes.
  2. Downloading the debug logs so they can be persisted (and searched).

I'm hoping to do this without reinventing too many wheels. As Sfdx Cli should be able to do these tasks from the command line, I'm wondering whether/how I can manipulate Sfdx from an Azure C# scheduled function app.

Upvotes: 0

Views: 608

Answers (1)

Mohit Ganorkar
Mohit Ganorkar

Reputation: 2078

What you can do is dockerize the function and then deploy it.

This will help you to run the console app in the function.

Also, you will get all the desired functionality of the function while the dockerization will help you run console app on it.

You have to bundle the console app with the function app.
refer the following documentation on deploying using docker.

Upvotes: 1

Related Questions