Writing a simple two command CMD batch file for task scheduler

时间:2015-06-25 18:35:54

标签: batch-file cmd admin

I am having an issue with the new version of Tableau 9.0.1 where I need to run tabadmin cleanup daily or else several gigabites of data will be stored on my server slowing things down and often leading to crashes if not taken care of regularly.

Can someone help me write a batch file script to accomplish the following commands that can be run every morning using task scheduler to avoid future issues?

Tableau is said to be releasing a patch fix from this issue in 9.1.0 but it is an issue we are dealing with currently.

Scripts to run:

cd C:\Program Files\Tableau\Tableau Server\9.0\bin

tabadmin cleanup


I would appreciate anyone's help who is familiar with writing batch files.

Thank you,

Connor

1 个答案:

答案 0 :(得分:0)

如果你在里面睡觉并放入启动文件夹怎么办?

因此,当服务器启动时,它将运行到文件,在文件中你可以睡眠X秒,然后它可以运行它们。然后,如果你有一个循环,你可以让它每12小时或24小时清洁一次。然后,如果你失去动力或重新启动,它将再次运行。