Anacron: command not found

I’m currently running a VM on Windows with suse. I’m trying to crontab a script but crontab doesn’t work when the system is offline. So Anacron was suggested to me, however the command isn’t found. How do I install it on my machine?

Hello and welcome here.

People are better able to help you when you tell them which version of openSUSE you use.
I hope it is openSUSE, because you say “suse” and that may confuse people with SUSE Linux Enterprise.

The package is called “cronie-anacron”.

Btw, “cnf” (which should have been suggested to you by the shell when you tried to run it) would have told you:

wolfi@amiga:~> anacron
If 'anacron' is not a typo you can use command-not-found to lookup the package that contains it, like this:
    cnf anacron
wolfi@amiga:~> cnf anacron                       
The program 'anacron' can be found in the following package:
  * cronie-anacron  path: /usr/sbin/anacron, repository: zypp (openSUSE-13.2-1.28) ]

Try installing with:
    sudo zypper install cronie-anacron

:wink:

That said, I probably cannot really help you with anacron itself, as I never used it.
But have a look at its man pages (“man anacron” and “man anacrontab”) after you installed it.

I’ve tried cnf anacron, but it can’t find the command or package.
Do I need to add that repository?

Normally not, it is included in the distribution.
At least in openSUSE since 11.4 or even longer.

But as hcvv already wrote, you should tell which distribution you are actually using.