píng​shí​bù​shāo​xiāng, lín​shí​bào​fó​jiǎo

last-minute effort

平时不烧香,临时抱佛脚 (平時不燒香,臨時抱佛腳) píng​shí​bù​shāo​xiāng, lín​shí​bào​fó​jiǎo
last-minute effort
To neglect preparation until the last moment and then act in panic or seek help desperately; literally, to never burn incense when all is well, but clutch Buddha's feet in a crisis.

Sources

Definitions
CC-CEDICT