Work good for me
//A string of commands to run at the beginning and end of a map respectively.
//Eg set cl_endmapcmd "screenshot" will take a screenshot at the end of a map.
//set cl_beginmapcmd "cmd say Hello"
set cl_endmapcmd "screenshot jpg"