It’s not provided out of the box, but you could do it with a small extension. (Quite possibly this already exists.)
The only hangup is that you can’t specify a directory – neither Glulx nor Z-code lets you do that. So where the file winds up is up to the interpreter. Could be the same directory as the game file, or in a folder in the user’s documents directory somewhere. That may be fine, though, depending on what you need.
Yep, here’s an example of how it would work for Glulx. This extension always uses the name “autosave” (it’s hardcoded into the functions) but it wouldn’t be too hard to read the value of an I7 text variable instead.