ASFEnhance icon indicating copy to clipboard operation
ASFEnhance copied to clipboard

Schedule claimitem daily

Open Nuklon opened this issue 1 year ago • 9 comments

Describe what feature you want / 描述需要加入的新功能 There are quite often free items to get with the claimitem command that require running this command daily to get all items. Would it be possible to add an option to do this automatically once a day?

Nuklon avatar Dec 14 '23 15:12 Nuklon

wip, maybe add in next version

chr233 avatar Dec 14 '23 15:12 chr233

Before official support is available, this can already be achieved by setting up a cron job (or using Task Scheduler) that sends the CI [Bots] command to the ASF API.

azhuge233 avatar Dec 16 '23 20:12 azhuge233

Before official support is available, this can already be achieved by setting up a cron job (or using Task Scheduler) that sends the CI [Bots] command to the ASF API.

Not so easy under Windows.

Nuklon avatar Dec 17 '23 12:12 Nuklon

Before official support is available, this can already be achieved by setting up a cron job (or using Task Scheduler) that sends the CI [Bots] command to the ASF API.

A little more details, you can easily do this using bash or Powershell

bash (Linux or more)

curl -X POST \
  'http(s)://[your ASF instance domain or IP]/Api/Command' \
  --header 'Authentication: [your ASF IPC Password here]' \
  --header 'Content-Type: application/json' \
  --data-raw '{ "Command": "CI asf" }'

PowerShell (Windows)

Invoke-WebRequest -Method POST `
  -URI "http(s)://[your ASF instance domain or IP]/Api/Command" `
  -ContentType "application/json" `
  -Headers @{ 'Authentication' = '[your ASF IPC Password here]' } `
  -Body "{ 'Command': 'CI asf' }"

Under Linux, create a cron job with crontab -e to execute the command periodically (or save it as a script). Windows also comes with a Task Scheduler can do the same job as cron, you can save the above command as a .ps1 script, and execute it with powershell.exe.

azhuge233 avatar Dec 20 '23 05:12 azhuge233

added, ASFEnhance will execute CLAIMITEM for bots which set AutoSteamSaleEvent to true, every 8 hours, after 2.0.8.0

chr233 avatar Jan 04 '24 02:01 chr233

I assume AutoSteamSaleEvent was made into AutoClaimItemBotNames ? Unfortunately there is no Steam Sale up so that I could check if it is working, but thank you for the added functionality!

psy0ch avatar Jan 06 '24 22:01 psy0ch

I assume AutoSteamSaleEvent was made into AutoClaimItemBotNames ? Unfortunately there is no Steam Sale up so that I could check if it is working, but thank you for the added functionality!

nope, AutoSteamSaleEvent now don't work for ASFEnhance, use AutoClaimItemBotNames to control which bot to enable this future

chr233 avatar Jan 07 '24 01:01 chr233

I assume AutoSteamSaleEvent was made into AutoClaimItemBotNames ? Unfortunately there is no Steam Sale up so that I could check if it is working, but thank you for the added functionality!

nope, AutoSteamSaleEvent now don't work for ASFEnhance, use AutoClaimItemBotNames to control which bot to enable this future

请问具体怎么设置asf.json啊。如果我有连个bot:0和1,是写"AutoClaimItemBotNames": "0,1"吗?

visualwind avatar Feb 06 '24 19:02 visualwind

I assume AutoSteamSaleEvent was made into AutoClaimItemBotNames ? Unfortunately there is no Steam Sale up so that I could check if it is working, but thank you for the added functionality!

nope, AutoSteamSaleEvent now don't work for ASFEnhance, use AutoClaimItemBotNames to control which bot to enable this future

请问具体怎么设置asf.json啊。如果我有连个bot:0和1,是写"AutoClaimItemBotNames": "0,1"吗?

是的

chr233 avatar Feb 07 '24 00:02 chr233