Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2020 09:43 AM
Hi,
You can create a scheduler with type script of your choosing and add below code.
var gr = new GlideRecord("sys_user");
var gdt = new GlideDateTime();
gdt.addDays(-60);
gr.addQuery("last_login_time","<=",gdt);
gr.addActiveQuery();
gr.query();
gr.active=false;
gr.updateMultiple();
Mark the comment as a correct answer and helpful if it helps.