Combreal

auto_mapcycle_halo

Aug 13th, 2021 (edited)
554
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #-------------create scheduled task to execute this powershell script every day at 8am  : -------------
  2.  
  3. Stop-Process -Name "haloceded" -Force
  4.  
  5. If((get-date).DayOfWeek -eq "Wednesday")
  6. {
  7.     Copy-Item -Path "C:\path_to_init\init_race.txt" -Destination "C:\path_to_init\init.txt" -Force
  8. }
  9. else
  10. {
  11.     Copy-Item -Path "C:\path_to_init\init_ctfrocket.txt" -Destination "C:\path_to_init\init.txt" -Force
  12. }
  13.  
  14. Start-Process -FilePath "C:\path_to_haloceded\haloceded.exe"
  15.  
  16.  
  17.  
  18. #-------------Or create cron or systemd task to execute this shell script every day at 8am : -------------
  19.  
  20. #!/bin/bash
  21.  
  22. ps -ef | grep haloceded | grep -v 'grep' | awk '{print $2}' | xargs kill
  23.  
  24. if [ $(date +%u) -eq 3 ]
  25. then
  26.     cp -r /path_to_init/init_race.txt /path_to_init/init.txt
  27. else
  28.     cp -r /path_to_init/init_ctfrocket.txt /path_to_init/init.txt
  29. fi
  30.  
  31. /path_to_haloceded/haloceded
Add Comment
Please, Sign In to add comment