SamuelC
SamuelC

Reputation: 219

Azure Webjobs and php.exe

I have a php application (ARPReach) installed on a Azure VM. I use Task Scheduler to run a .bat every 5 min that has this simple line of code:

"C:\Program Files (x86)\PHP\v5.4\php.exe" E:\Web\arp\a.php cli/auto

Now I want to move this php app to Azure Website, and I need a similar scheduling functionality as the above.

I got the path to php.exe from the Kudu site and added a Webjob (cron.bat) to my website with the following line:

"D:\Program Files (x86)\PHP\v5.4\php.exe" D:\home\site\wwwroot\a.php cli/auto

and it seems to work fine.

However I'm not sure if this is the right way to do it with Azure Webjobs / Websites. I mean are the paths going to change after restart or auto-scaling?

Can anyone confirm for me?

Upvotes: 0

Views: 458

Answers (1)

Amit Apple
Amit Apple

Reputation: 9182

Restart or scaling will not change this path, it should not change unless Azure Websites will stop supporting php version 5.4 for some reason.

So this batch file should work fine, I would use %ProgramFiles% instead of D:\Program Files (x86).

Upvotes: 1

Related Questions