Add bin using crate english-to-cron.
This commit is contained in:
		
							parent
							
								
									c0a285af36
								
							
						
					
					
						commit
						c76a20e37c
					
				
					 1 changed files with 15 additions and 0 deletions
				
			
		
							
								
								
									
										15
									
								
								src/bin/using-crate-english-to-cron.rs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/bin/using-crate-english-to-cron.rs
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| fn main() { | ||||
|     let texts = vec![ | ||||
|         "every 15 seconds", | ||||
|         "every minute", | ||||
|         "every day at 4:00 pm", | ||||
|         "at 10:00 am", | ||||
|         "Run at midnight on the 1st and 15th of the month", | ||||
|         "on Sunday at 12:00", | ||||
|     ]; | ||||
| 
 | ||||
|     for text in texts { | ||||
|         let res = english_to_cron::str_cron_syntax(text); | ||||
|         println!("{text}: {res:#?}"); | ||||
|     } | ||||
| } | ||||
		Loading…
	
	Add table
		
		Reference in a new issue