0

I have set up a fish alias for some commands that I frequently need to run manually. Now, I want the same commands to be run regularly. How can I set up cron to automatically run a fish alias?

1
  • 2
    Write the alias as a script instead and then schedule the script?
    – Kusalananda
    Commented Jan 14 at 11:13

1 Answer 1

0

A possible way is to put the following in the crontab:

* * * * * user fish -c "my-fish-alias"

One has to make sure that the aliases are defined for the user that runs the cron job, e.g. by putting the my-fish-alias.fish file that defines the alias in /etc/fish/functions.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .