开发者

Best way of reliably updating content at a specific time across VARIOUS files and formats?

开发者 https://www.devze.com 2022-12-30 08:53 出处:网络
Let\'s say I have to push a change live at 8 AM EST on Tuesday May 18th - this change is across various files:

Let's say I have to push a change live at 8 AM EST on Tuesday May 18th - this change is across various files:

  • xml file
  • php file
  • 30x static html files with no php processing enabled

all of these are hosted on a linux server with cron.

Is it reliable setting up a cron job to call a script which takes these files, for example:

  • templates/template.php
  • navigation.xml
  • specials-hot-deal.html

and appends '-old' to th开发者_开发技巧ose, along with renaming the live files I'll have on the server "template-new.php", "navigation-new.xml" at that approximate time?

Is this reliable or should I just manually do this? Of course since I'm not familiar with cron I'll probably have to test it out today. Any weird cron gotchas I should know about?


im not sure that using a cron job for deploying changes is the best idea. you may be able to accomplish this, but usually cron is used for automated tasks related to the app such as sending out mails, deleting things older than certain date ect, removing stray images.

is you application in version control such as svn or git. could you do your scheduled deployment through your version control?

just a thought.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号