Easy to hit Seach Queue number in setting for watching a time series log

Hi all,

I have to do indexing everyday at night. Without breaking the current application I have to use aliases by scheduling a job. Can someone let me know how to create a job for creating an alias and adding the new alias and removing the old one if the indexing is successful. Else keeping the old index as it is.

Eg : If my current alias is alias1 then new alias should be aliase2 and adding this and removing the aliase1 viceversa.

Thanks,
Vani Aravinda