Step 2: Synthesis of 5-chloro-1,3-dimethyl-1H-pyrazole-4-carbaldehyde: 2,5-dimethyl-1H-pyrazol-3(2H)-one (32 g, 285.71 mmol) was mixed with POCl3 (128 mL) at 0 °C and N,N-dimethylformamide (26.35 mL, 342.85 mmol) was added slowly. The reaction mixture was warmed to 100 °C and stirred for 7 h, during which the progress of the reaction was monitored by thin layer chromatography (TLC). Upon completion of the reaction, the mixture was concentrated to dryness under reduced pressure. The residue was alkalized with aqueous sodium bicarbonate and extracted with ethyl acetate. The organic layers were combined, dried with anhydrous Na2SO4 and concentrated under reduced pressure to give the crude product. The crude product was purified by column chromatography to afford the target compound 5-chloro-1,3-dimethyl-1H-pyrazole-4-carbaldehyde (28 g, 62.0% yield).