Reputation: 4763
I am trying to run a schedule task on my db in Azure. I was reading that this should be done using the mobile-services in the portal - So I created a mobile service and created a script which should be run every 1 minute and execute the following script:
Job_Sp_CheckOffers();
function Job_Sp_CheckOffers() {
var sql = "exec [dbo].[Job.CheckOffers]";
mssql.query(sql);
}
Buy it does not affect the db.
Any idea?
Thanks.
Upvotes: 0
Views: 188
Reputation: 4763
After checking the logs of the mobile-service I realized that I need to give the stored procedure a public permissions. I run this on my db:
GRANT EXEC ON [Job.IsOfferExpired] TO PUBLIC
Upvotes: 1