ã¯ããã«
ãGoogleã®ã¤ã³ãã©ã§å®è¡ãããã¯ã©ã¦ããµã¼ãã¹ Google App Engineã2009å¹´4æ7æ¥ã«Javaã«å¯¾å¿ãã¾ãããJavaã¨ã³ã¸ãã¢ã«ãå©ç¨ã§ããããã«ãªã£ããGoogle App Engineãä¸ç·ã«åå¼·ãã¦è¡ãã¾ãããï¼
ãä»åã¯ãGoogle App Engineä¸ã§è¨å®ããæéã«ããã°ã©ã ãåä½ããããã¨ãã§ããããApp Engine Cron Serviceãã®ä½¿ãæ¹ãåå¼·ãããã¨æãã¾ãã
対象èªè
- ã¦ã§ããµã¼ãã¹éçºã«èå³ã®ããJavaã¨ã³ã¸ãã¢
- Google App Engine for Javaã«èå³ãããæ¹
å¿ è¦ãªç°å¢
- ãGoogle Plugin for Eclipseããã¤ã³ã¹ãã¼ã«ããã¦ãããEclipse 3.3ï¼Europaï¼ã3.4ï¼Ganymedeï¼
ãéçºç°å¢ã®æ§ç¯æé ã«ã¤ãã¦ã¯ã第1åã®è§£èª¬ãåç §ãã¦ãã ããã
App Engine Cron Serviceã¨ã¯ï¼
ãã¦ã§ããµã¼ãã¹ãä½ã£ã¦ããã¨ã以ä¸ã®ããã«æ±ºã¾ã£ãæéã«ããã°ã©ã ãèµ°ãããããã¨ãããããã¾ãã
- æ¯æ¥24æã«1æ¥ã®ã¢ã¯ã»ã¹è¨é²ãçµ±è¨åãã¦ç®¡çè ã«ã¡ã¼ã«ãã
- æ¯æ1æ¥ã®0æã«ãã³ãã©ãªãã¼ã¿ã®åé¤ããã
ãWindowsç³»ã®ã·ã¹ãã ã§ã¯ããã¿ã¹ã¯ã»ã¹ã±ã¸ã¥ã¼ã©ããUNIXç³»ã®ã·ã¹ãã ã§ã¯ãCronããå©ç¨ãã¾ãããGoogle App Engineã«ãããã«ä¼¼ããApp Engine Cron Serviceãã¨å¼ã°ããä»çµã¿ãç¨æããã¦ãã¾ããApp Engine Cron Serviceã§ã¯ãæéã¨URLãè¨è¿°ããxmlãã¡ã¤ã«ãããã°ã©ã ã¨ä¸ç·ã«ãããã¤ãããã¨ã«ãã£ã¦ãããã°ã©ã ãå¶å¾¡ãã¾ãã
App Engine Cron Serviceã使ã£ã¦ã¿ããï¼
ãApp Engine Cron Serviceã®è¨å®ãã¡ã¤ã«ï¼cron.xmlï¼ã¯é常ã«ç°¡åã«æ¸ããã¨ãã§ãã¾ããæ©éãcron.xmlãè¦ã¦ã¿ã¾ãããã
<?xml version="1.0" encoding="UTF-8"?> <cronentries> <cron> <url>/cron/mail</url> <!-- ï¼1ï¼ --> <description>every 1 minutes</description> <!-- ï¼2ï¼ --> <schedule>every 1 minutes</schedule> <!-- ï¼3ï¼ --> </cron> </cronentries>
- èªåçã«å®è¡ãããURL
- ãã®å®ç¾©ã®ååï¼ç®¡çã³ã³ã½ã¼ã«ã®ãCron Jobsãã§è¡¨ç¤ºãããååã«ãªãã¾ãï¼
- ã¢ã¯ã»ã¹ããããæ¥æ
("every"|ordinal) (days) ["of" (monthspec)] (time) |
æ¸ãæ¹ã®ä¾
every 5 minutes every 12 hours 2nd,third mon,wed,thu of march 17:00 every monday 09:00 1st monday of sep,oct,nov 17:00 every day 00:00
é ç® | 詳細ãªèª¬æ |
every |
æ¯æ/æ¯æ¥/æ¯æã表ç¾ãããå ´åããeveryããæå®ãã¾ãã |
ordinal | æåã®é±/第3é±ãªã©ã表ç¾ãããå ´åãè±èªã§æå®ãã¾ããã1stãããfirstãã®ããããã®ãã©ã¼ãããã§æ¸ãã¾ããã«ã³ãï¼,ï¼ã§åºåããã¨ã§è¤æ°æå®ã§ãã¾ããä¾ï¼ã第1ã¨ç¬¬3ãã¨è¡¨ç¾ãããå ´åãã«ã³ãï¼,ï¼ã§åºåãã1st,3rdããããã¯ãfirst,thirdãã¨æå®ãã¾ãã |
days | ææ¥ãè±èªã§æå®ãã¾ãããmonãããmondayãã®ããããã®ãã©ã¼ãããã§æ¸ãã¾ããã«ã³ãï¼,ï¼ã§åºåããã¨ã§è¤æ°æå®ã§ãã¾ããæ¯æ¥ã®å ´åããevery mon,tue,wed,thu,fri,sat,sunãã®ä»£ããã«ãevery dayãã¨æ¸ããã¨ãã§ãã¾ãã |
monthspec | æãè±èªã§æå®ãã¾ãããjanãããjanuaryãã®ããããã®ãã©ã¼ãããã§æ¸ãã¾ããã«ã³ãï¼,ï¼ã§åºåããã¨ã§è¤æ°æå®ã§ãã¾ããæå®ããªãå ´åãæ¯æã«ãªãã¾ãã |
time | æéããHH:MMãã¹ã¿ã¤ã«ï¼24ææ¹å¼ï¼ã§æå®ãã¾ãã |