I was looking for the same thing, and I found this:
app.project.item(1).workAreaStart = 0; //in seconds
app.project.item(1).workAreaDuration = 5; //in seconds
I found this here:
https://blogs.adobe.com/wp-content/blogs.dir/48/files/2012/06/After-Effects-CS6-Scripting-Guide.pdf?file=2012/06/After-Effects-CS6-Scripting-Guide.pdf
And as this question can help more people I posted here ????
I think it should help you!
Kevyn Tuleu Dourado
(Sorry for the bad english)