The idea is to modify these variable at later time without having to redeploy the cloud project. Also could someone advise how can I modify the serviceconfig (where in the management portal)?
Yes, it is possible to do so. On the new management portal, click on your cloud service in question, then go to the deployment slot (Staging or Production) and then click on "CONFIGURE" tab. There you will be able to change the existing settings. You could
also upload a new configuration file there.
What I want is to call this function exactly or close to a specified time say 10AM every day. Is it possible and if so, could someone tell me what is the condition or code sample?
I'm assuming your Worker role is in an infinite loop, what you could do is check for time in that loop and if it is 10:00 AM, you execute some function. I've included a sample code below. Obviously you would need to ensure that you call this "TriggerMyFunction()"
only once per day.
while (true)
{
Thread.Sleep(10000);
Trace.WriteLine("Working", "Information");
DateTime currentDateTime = DateTime.Now;//Will return date/time in UTC
if (currentDateTime.TimeOfDay.Hours == 10)
{
TriggerMyFunction();
}
}
Hope this helps.