简体   繁体   中英

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?

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) .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM