ipmanlk/anilist-to-mal-sync

Support for a config file for cron usage?

TobiTenno opened this issue · 8 comments

Would it be possible to add support for config files from cron usage?

There is support for syncing periodically using --watch and you can configure how often sync should happen using the configuration file. It's located in ~/.config/ani2mal on Linux and %appdata%/ani2mal on Windows.

right, but cron is for infrequent one-off tasks with a daemon that's built into most distros... it'd be the same as doing a task scheduler task on windows...

i.e. i'd rather have something run briefly in sync with an existing toolchain than have another process running all the time.

You can use this with crontab if you install it as a global package using npm install -g. For an example,
0 0 * * 7 ani2mal --sync

that's assuming it has access to profile context to know that it's my profile to run against, which isn't typically the case in cron. (thus why i was hoping to specify precisely where the config is)

Got it. I will add support for specifying the config directory when running this.

ty much!

Support for custom configuration directory has been added in 206a4d8.

Thanks a bunch! I'll test it as soon as I can