尊龙凯时人生就是搏

ÔõÑùÔÚLinuxÉÏÉèÖÃϵͳ׼ʱʹÃü

ÔõÑùÔÚlinuxÉÏÉèÖÃϵͳ׼ʱʹÃü

ÔÚLinuxϵͳÖÐ £¬ÎÒÃǾ­³£ÐèҪ׼ʱִÐÐһЩʹÃü £¬ºÃ±È±¸·ÝÊý¾Ý¿â¡¢ÕûÀíÈÕÖ¾ÎļþµÈµÈ¡£ÎªÁËʵÏÖÕâЩ׼ʱʹÃü £¬ÎÒÃÇ¿ÉÒÔʹÓÃLinuxϵͳµÄ׼ʱʹÃü¹¤¾ß¡ª¡ªcrontab¡£

Ò»¡¢Ïàʶcrontab

crontabÊÇLinuxϵͳϵÄÒ»¸ö׼ʱʹÃüÖÎÀí¹¤¾ß £¬ÓÃÓÚÖ´Ðа´ÆÚµÄʹÃü¡£Ëü»áƾ֤Ԥ¶¨µÄʱ¼äÖ´ÐÐÖ¸¶¨µÄʹÃü £¬¿ÉÒÔÔÚºǫ́×Ô¶¯ÔËÐÐ £¬ºÜÊÇÀû±ã¡£

¶þ¡¢ÉèÖÃ׼ʱʹÃü

·­¿ªÖÕ¶Ë £¬ÊäÈëÏÂÁîcrontab -e £¬½øÈë׼ʱʹÃü±à¼­Æ÷¡£

Ôڱ༭Æ÷Àï £¬ÎÒÃÇ¿ÉÒÔÉèÖÃеÄ׼ʱʹÃü¡£Ã¿Ò»Ðдú±íÒ»¸öʹÃü £¬Ã¿ÐеÄÃûÌÃÈçÏ£º

·ÖÖÓ Ð¡Ê± ÈÕÆÚ ÔÂ·Ý ÐÇÆÚ ÒªÖ´ÐеÄÏÂÁî

µÇ¼ºó¸´ÖÆ

ÆäÖÐ £¬·ÖÖÓÈ¡Öµ¹æÄ£ÊÇ0-59 £¬Ð¡Ê±È¡Öµ¹æÄ£ÊÇ0-23 £¬ÈÕÆÚÈ¡Öµ¹æÄ£ÊÇ1-31 £¬Ô·ÝÈ¡Öµ¹æÄ£ÊÇ1-12 £¬ÐÇÆÚÈ¡Öµ¹æÄ£ÊÇ0-7£¨0ºÍ7¶¼ÌåÏÖÐÇÆÚÈÕ£©¡£

ÀýÈç £¬ÏÂÃæµÄʾÀýÊÇÌìÌìÏÂÕ½Êé3µã׼ʱ±¸·ÝÊý¾Ý¿â£º

0 15 * * * /usr/bin/mysqldump -u username -p password database > /path/to/backup.sql

µÇ¼ºó¸´ÖÆ

Õâ¸öʾÀýÖÐ £¬0 15 * * *ÌåÏÖÌìÌìµÄµÚ15Сʱ£¨¼´ÏÂÕ½Êé3µã£© £¬/usr/bin/mysqldump -u username -p password database > /path/to/backup.sqlÊÇÒªÖ´ÐеÄÏÂÁî £¬½«Êý¾Ý¿â±¸·Ýµ½/path/to/backup.sqlÎļþÖС£

±à¼­Íê±Ïºó £¬°´ÏÂCtrl + X £¬È»ºó°´ÏÂYÉúÑÄÍ˳ö¡£

Èý¡¢³£ÓõÄcrontab²Ù×÷ÏÂÁî

ÔÚʹÓÃcrontabʱ £¬»¹¿ÉÒÔʹÓÃһЩÏÂÁîÀ´ÖÎÀí׼ʱʹÃü¡£

crontab -l£ºÁгöÄ¿½ñÓû§µÄ׼ʱʹÃüÁбí¡£

crontab -e£º±à¼­Ä¿½ñÓû§µÄ׼ʱʹÃüÁбí¡£

crontab -r£ºÉ¾³ýÄ¿½ñÓû§µÄ׼ʱʹÃüÁбí¡£

crontab -u username -l£ºÁгöÖ¸¶¨Óû§µÄ׼ʱʹÃüÁбí¡£

crontab -u username -e£º±à¼­Ö¸¶¨Óû§µÄ׼ʱʹÃüÁбí¡£

crontab -u username -r£ºÉ¾³ýÖ¸¶¨Óû§µÄ׼ʱʹÃüÁбí¡£

ËÄ¡¢ÆäËû×¢ÖØÊÂÏî

ÔÚ±àд׼ʱʹÃüʱ £¬Òª×¢ÖØÏÂÁîµÄÖ´Ðз¾¶¡£×îºÃʹÓþø¶Ô·¾¶ £¬×èÖ¹ÓÉÓÚÇéÐαäÁ¿µÈÎÊÌâµ¼ÖÂÕÒ²»µ½ÏÂÁî¡£

ÔÚ׼ʱʹÃüÖÐ £¬¿ÉÒÔʹÓÃͨÅä·ûÀ´ÊµÏÖ¸üÎÞаµÄʹÃüµ÷Àí¡£ºÃ±È £¬*ÌåÏÖËùÓпÉÄܵÄÈ¡Öµ £¬*/nÌåÏÖÿn¸öʱ¼äµ¥Î»¡£

crontabÖ§³ÖʹÓÃ@rebootÒªº¦×ÖÀ´ÊµÏÖϵͳÆô¶¯Ê±×Ô¶¯Ö´ÐеÄʹÃü¡£ÀýÈ磺

@reboot /path/to/your/script

µÇ¼ºó¸´ÖÆ

ÒÔÉϾÍÊÇÔÚLinuxÉÏÉèÖÃϵͳ׼ʱʹÃüµÄÒªÁìºÍʾÀý¡£Í¨¹ýºÏÀíÉèÖÃ׼ʱʹÃü £¬ÎÒÃÇ¿ÉÒÔʵÏÖ×Ô¶¯»¯ÔËά²Ù×÷ £¬Ìá¸ßЧÂʺÍÎȹÌÐÔ¡£Ï£Íû¶ÔÄãÓÐËù×ÊÖú£¡

ÒÔÉϾÍÊÇÔõÑùÔÚLinuxÉÏÉèÖÃϵͳ׼ʱʹÃüµÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí £¬°æȨÕùÒéÓë±¾Õ¾ÎÞ¹Ø £¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í尊龙凯时人生就是搏ÂËÓÍ»úÍø¹Ù·½Ì¬¶È £¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ £¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢ £¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢ £¬ÇëÄúÁ¬Ã¦ÁªÏµ尊龙凯时人生就是搏ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ尊龙凯时人生就是搏

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎå £¬9:30-18:30 £¬½ÚãåÈÕÐÝÏ¢

QR code
sitemap¡¢ÍøÕ¾µØͼ