How can I schedule resizing a Linode?

Linode Staff

How can I set a specific time to resize my Linode?

1 Reply

While there is no way to do this directly using the tools on our platform (Cloud Manager, API, or CLI), you can write a script that uses the CLI or API, and execute it using a cron job.

An example script using the API would look similar to this:

#!/usr/bin/env bash

curl -H "Content-Type: application/json" \
    -H "Authorization: Bearer $API_TOKEN" \
    -X POST -d '{
      "type": "g6-standard-2"
    }' \
    https://api.linode.com/v4/linode/instances/$LINODE_ID/resize

And example script using the CLI would look similar to this:

#!/usr/bin/env bash

linode-cli linodes resize $LINODE_ID --type g6-standard-2

The documentation for the resize endpoint can be found here.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct