Skip to content

Hooks are not executed on interval #178

Description

@vitality411

Current version:

Switch:
                version       : v0.9.3
                build date    : 2025-02-21
                go version    : go1.23.6
                go compiler   : gc
                platform      : linux/amd64
                backing-stores: [ akamai azure capi digitalocean eks exoscale filesystem gardener gke ovh plugin rancher scaleway vault ]

Problem:
Hooks are not executed on interval

switch hooks ls
+--------------------+------------+----------+----------------+
| NAME               | TYPE       | INTERVAL | NEXT EXECUTION |
+--------------------+------------+----------+----------------+
| create-kubeconfigs | Executable | 1m0s     | Now            |
+--------------------+------------+----------+----------------+
| TOTAL              | 1          |          |                |
+--------------------+------------+----------+----------------+

When I execute switch it just shows the fuzzy search of the contexts and never executes the hook.
Same with v0.8.1.

With switch v0.7.2 and the same config it correctly runs the hook:

switch
INFO[0000] Executing hook "create-kubeconfigs"...        hook=
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions