fix bug for opening js template as cronjob