0

I want to perform a task with a php file, (updating a feed) which I want to do automatically once a day. I DON'T want to have to load the file in a browser by hand. The file itself could be anything (very small and fast) but it needs to be run every day without using Cron jobs

2 Answers2

0

If you're on a Windows machine, you can use a scheduled task (here are the instructions for Windows 7, but Google "run scheduled task " to find similar pages for other versions). It has much the same options as Cron, with a simple interface.

Two other possible hacks:

  • Have the URL for the feed itself be a PHP script that updates the feed and outputs it directly. Then you could but a cache in front of that URL so it only refreshes once a day (for instance the free level of Cloudfare).
  • Have the PHP script create a webpage that refreshes itself once a day, using the meta refresh tag. Then open a browser window and never close it.
Joel
  • 237
  • 3
  • 9
0

If the page you have created is exposed to network, you could theoretically run a cron-job from another machine on the said network and call a curl to the page: curl http://server/yourphp

TomasH
  • 148
  • 1
  • 7