平时不烧香,急时抱佛脚 píngshíbùshāoxiāngjíshíbàofójiǎo neglect leads to desperation
to neglect one's duties or relationships when things are calm, only to seek help or work frantically when a crisis arises; literally to not burn incense in ordinary times, but to clasp the Buddha's feet in an emergency