Add start.sh
This commit is contained in:
		
							parent
							
								
									a2849d5c41
								
							
						
					
					
						commit
						df0aa45d8e
					
				
					 1 changed files with 19 additions and 0 deletions
				
			
		
							
								
								
									
										19
									
								
								start.sh
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								start.sh
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,19 @@
 | 
				
			||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cd "/PATH/TO/WORKING/DIR/" || exit 1
 | 
				
			||||||
 | 
					# Get the current day of the month
 | 
				
			||||||
 | 
					day_of_month=$(date +%d)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Check if it's the 1st of the month
 | 
				
			||||||
 | 
					if [ "$day_of_month" -le 3 ] && [ "$day_of_month" -ge 1 ]; then
 | 
				
			||||||
 | 
					    # Run your command
 | 
				
			||||||
 | 
					    rm *.pdf
 | 
				
			||||||
 | 
					    rm *.json
 | 
				
			||||||
 | 
					    /PATH/TO/WORKING/DIR/lunchbot-env/bin/python getmenu.py
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/PATH/TO/WORKING/DIR/lunchbot-env/bin/python lunch.py
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					exit
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue