ngovananh
		
	commited on
		
		
					Commit 
							
							·
						
						dbfebb7
	
1
								Parent(s):
							
							01bcee9
								
auto commit 2025-10-20 11:53:56
Browse files- auto_push.sh +14 -0
    	
        auto_push.sh
    ADDED
    
    | @@ -0,0 +1,14 @@ | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            #!/bin/bash
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            while true; do
         | 
| 4 | 
            +
                git add .
         | 
| 5 | 
            +
                git commit -m "auto commit $(date '+%Y-%m-%d %H:%M:%S')" || true
         | 
| 6 | 
            +
                git push
         | 
| 7 | 
            +
                if [ $? -eq 0 ]; then
         | 
| 8 | 
            +
                    echo "✅ Push thành công lúc $(date)"
         | 
| 9 | 
            +
                    break
         | 
| 10 | 
            +
                else
         | 
| 11 | 
            +
                    echo "❌ Push thất bại – thử lại sau 10 phút..."
         | 
| 12 | 
            +
                    sleep 600   # = 10 phút
         | 
| 13 | 
            +
                fi
         | 
| 14 | 
            +
            done
         |