這里會顯示出您選擇的修訂版和當前版本之間的差別。
后一修訂版 | 前一修訂版 | ||
razor:auto-archiving [2015/03/17 15:03] cobub 創(chuàng)建 |
razor:auto-archiving [2017/07/14 11:18] (當前版本) |
||
---|---|---|---|
行 1: | 行 1: | ||
- | 本文檔適用于Cobub Razor-**開源的、移動應用分析系統(tǒng)**的Version 0.7 版本。請訪問[[razor:release-note|release note]]獲取更多版本信息。 | + | ~~Title:Cobub Razor定時任務 - 開源移動應用運營平臺 - 移動統(tǒng)計、移動推送解決方案 - Cobub 移動開發(fā)者中心~~? |
+ | {{description>在Cobub Razor中,必須在服務器上設(shè)置一個定時任務,這樣數(shù)據(jù)可以自動從工廠數(shù)據(jù)庫轉(zhuǎn)到數(shù)據(jù)倉庫進行處理。所有的移動應用統(tǒng)計分析報表數(shù)據(jù)來自于數(shù)據(jù)倉庫。為了自動觸發(fā)Cobub Razor任務,用戶可以設(shè)置一個腳本執(zhí)行任務計劃}}? | ||
+ | {{keywords>Cobub Razor,開源移動應用分析,移動分析,移動應用分析,定時任務}}? | ||
+ | ====== 定時任務 ======? | ||
+ | ? | ||
====== 1 概述 ====== | ====== 1 概述 ====== | ||
行 76: | 行 81: | ||
crontab -e | crontab -e | ||
然后,增加以下代碼行: | 然后,增加以下代碼行: | ||
+ | <code> | ||
# 表示每個小時的第五分鐘執(zhí)行一次腳本 | # 表示每個小時的第五分鐘執(zhí)行一次腳本 | ||
行 94: | 行 100: | ||
/etc/init.d/cron restart | /etc/init.d/cron restart | ||
+ | </code> | ||
====== 3 Windows的定時任務 ====== | ====== 3 Windows的定時任務 ====== | ||
行 99: | 行 106: | ||
- | 要打開Windows (XP, 7, 2003/2008 服務器)上的任務計劃,單擊所有程序,附件,系統(tǒng)工具,然后點擊任務計劃。 | + | 要打開Windows (XP, 7, 2003/2008 服務器)上的任務計劃,單擊所有程序,附件,系統(tǒng)工具,然后點擊任務計劃程序。 |
- | 點擊‘增加任務計劃’并為任務命名,例如,”Razor Hourly Archive”。計劃任務如下所示。? | + | 點擊‘操作’,‘創(chuàng)建基本任務’并為任務命名,例如,”Razor Hourly Archive”。計劃任務如下所示。? |
- | {{:razor:20150317-065722.png}} | + | {{:razor:201508180.png}} |
===== 3.2 定時任務配置 ===== | ===== 3.2 定時任務配置 ===== | ||
行 110: | 行 117: | ||
- | php “D:\xampp\htdocs\razor\index.php”archive archiveHourly | + | php “? |
+ | D:\xampp\htdocs\razor\web\index.php”archive archiveHourly | ||
- | 如 果php.exe已經(jīng)添加到系統(tǒng)環(huán)境變量的PATH下,則第一個參數(shù)只需寫成php,如果php.exe還沒添加到環(huán)境變量下,請?zhí)顚懫渌诘脑敿毬窂剑?例如,D:\xampp\php\php.exe。”D:\xampp\htdocs\razor\index.php”是Cobub Razor在服務器上的目錄,archive和archiveHourly是定時任務執(zhí)行時需要的參數(shù)。? | + | 如 果php.exe已經(jīng)添加到系統(tǒng)環(huán)境變量的PATH下,則第一個參數(shù)只需寫成php,如果php.exe還沒添加到環(huán)境變量下,請?zhí)顚懫渌诘脑敿毬窂剑?例如,D:\xampp\php\php.exe。”D:\xampp\htdocs\razor\web\index.php”是Cobub Razor在服務器上的目錄,archive和archiveHourly是定時任務執(zhí)行時需要的參數(shù)。? |
- | {{:razor:20150317-065805.png}}? | + | ? |
- | {{:razor:20150317-065821.png}} | + | {{:razor:201508181.png}}? |
+ | {{:razor:201508182.png}} | ||
==== 2. 每周數(shù)據(jù)存檔 ==== | ==== 2. 每周數(shù)據(jù)存檔 ==== | ||
- | php “D:\xampp\htdocs\razor\index.php” archive archiveWeekly? | + | php “D:\x? |
- | {{:razor:20150317-065857.png}} | + | ampp\htdocs\razor\web\index.php” archive archiveWeekly? |
+ | ? | ||
+ | {{:razor:201508183.png}} | ||
==== 3. 每月數(shù)據(jù)存檔 ==== | ==== 3. 每月數(shù)據(jù)存檔 ==== | ||
- | php “D:\xampp\htdocs\razor\index.php”archive archiveMonthly? | + | php “D:\x? |
- | {{:razor:20150317-065934.png}} | + | ampp\htdocs\razor\web\index.php”archive archiveMonthly? |
+ | ? | ||
+ | {{:razor:201508184.png}} | ||
==== 4. 遲來數(shù)據(jù)存檔 ==== | ==== 4. 遲來數(shù)據(jù)存檔 ==== | ||
- | php “D:\xampp\htdocs\razor\index.php” archive archiveLaterData? | + | php “D:\x? |
- | {{:razor:20150317-070006.png}} | + | ampp\htdocs\razor\web\index.php” archive archiveLaterData? |
+ | ? | ||
+ | {{:razor:201508185.png}} | ||
==== 5. 每天數(shù)據(jù)存檔 ==== | ==== 5. 每天數(shù)據(jù)存檔 ==== | ||
- | php “D:\xampp\htdocs\razor\index.php” archive archiveUsingLog? | + | php “D:\x? |
- | {{:razor:20150317-070117.png}} | + | ampp\htdocs\razor\web\index.php” archive archiveUsingLog? |
+ | ? | ||
+ | {{:razor:201508186.png}} | ||
====== 4 Web 定時任務 ====== | ====== 4 Web 定時任務 ====== | ||
- | 如果可以在服務器上做定時任務,我們極力推薦用戶運行定時任務或任務計劃。但是,在某些共享主機或特殊配置的服務器上,不允許運行定時任務 或任務計劃。 | + | 如果可? |
+ | 以在服務器上做定時任務,我們極力推薦用戶運行定時任務或任務計劃。但是,在某些共享主機或特殊配置的服務器上,不允許運行定時任務 或任務計劃。 | ||
某些web主機允許設(shè)置web 定時任務,主機會在預定時間自動訪問這個簡單的URL。如果想使用web 定時任務,可以在主機界面輸入一下URL 。 | 某些web主機允許設(shè)置web 定時任務,主機會在預定時間自動訪問這個簡單的URL。如果想使用web 定時任務,可以在主機界面輸入一下URL 。 | ||
+ | <code> | ||
http://server_url/index.php?/archive/archiveHourly | http://server_url/index.php?/archive/archiveHourly | ||
行 145: | 行 163: | ||
http://server_url/index.php?/archive/archiveUsingLog | http://server_url/index.php?/archive/archiveUsingLog | ||
+ | </code> | ||
====== 5 下一步 – 配置 ====== | ====== 5 下一步 – 配置 ====== | ||
如果想使用Cobub Razor更多功能,請參見 | 如果想使用Cobub Razor更多功能,請參見 | ||
* [[razor:configuration|配置]] | * [[razor:configuration|配置]] |