1
votes

Azure WebJobs sdk with BlobTrigger attribute can detect when any blob is updated or added to some container. Is it possible to write a Function that would just read existing blob on schedule or on demand with TextReader parameter, as the following:

ReadBlob([Blob("blah/blobname.txt")] TextReader input) {}

The alternative is not to use webjobs sdk and download blob with Azure Storage SDK from Main()

1

1 Answers

2
votes

In a scheduled/on demand job you can use JobHost.Call

public class Program
{
    public static void Main()
    {
        JobHost host = new JobHost();
        host.Call(typeof(Program).GetMethod("ReadBlob"));
    }

    public static void ReadBlob([Blob("blah/blobname.txt")] TextReader input)
    {
    }
}