These words are traditionally said to be the last that the Buddha uttered to an audience of Arahants, just before he passed into parinibbāna. The source text is chapter six of the Mahāparinibbāna Sutta (Dīgha Nikāya 16.6.8).
va ya dha mmā saṃ khā rā
a ppa mā de na saṃ pa de thā
Conditioned things are perishable;
with vigilance strive to succeed.
Pāli text from the Vipassana Research Institute CD of the Pāli Canon - now available as a download. The translation is my own.
I have written full length commentary on the Buddha's Last Words which is now on my website: jayarava.org/buddhas-last-words.html. I've also written a shorter gloss focusing on the word appamāda on my blog: see The Last Words of the Buddha