Combreal icon

auto_mapcycle_halo

Combreal | PRO | 08/13/21 03:44:49 PM UTC (Edited) | 0 ⭐ | 1128 👁️ | Never ⏰ | []
PowerShell |

860 B

|

None

|

0 👍

/

0 👎

#-------------create scheduled task to execute this powershell script every day at 8am  : -------------
 
Stop-Process -Name "haloceded" -Force
 
If((get-date).DayOfWeek -eq "Wednesday")
{
    Copy-Item -Path "C:\path_to_init\init_race.txt" -Destination "C:\path_to_init\init.txt" -Force
}
else
{
    Copy-Item -Path "C:\path_to_init\init_ctfrocket.txt" -Destination "C:\path_to_init\init.txt" -Force
}
 
Start-Process -FilePath "C:\path_to_haloceded\haloceded.exe"
 
 
 
#-------------Or create cron or systemd task to execute this shell script every day at 8am : -------------
 
#!/bin/bash
 
ps -ef | grep haloceded | grep -v 'grep' | awk '{print $2}' | xargs kill
 
if [ $(date +%u) -eq 3 ]
then
    cp -r /path_to_init/init_race.txt /path_to_init/init.txt
else
    cp -r /path_to_init/init_ctfrocket.txt /path_to_init/init.txt
fi
 
/path_to_haloceded/haloceded

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎