Apple-Monitor icon indicating copy to clipboard operation
Apple-Monitor copied to clipboard

A Minor crontab Issue

Open sudo-sc opened this issue 1 year ago • 3 comments

I came across this project today and tested it, and although this is a 3-year-old project, it still works in 2025 (iPhone 17 era) 👍.

One minor suggestion is that, I am not sure of the use of the question mark in "cronExpressions": "*/12 * * * * ?" (config.json).

This might be parser-dependent but it is likely deemed invalid on Ubuntu and maybe other distributions with built-in crontab, causing the program to fetch inventory at every second - crontab ignored the leading expression.

Removing the question mark would fix the problem.

"cronExpressions": "*/12 * * * * ?" -> fetches at every second "cronExpressions": "*/12 * * * *" -> fetches at every 12th minute

Maybe a reminder in readme.md would help clear things up.

sudo-sc avatar Sep 22 '25 09:09 sudo-sc

@MoshiCoCo can I fix this issue?

AKakkar28 avatar Sep 23 '25 05:09 AKakkar28

I came across this project today and tested it, and although this is a 3-year-old project, it still works in 2025 (iPhone 17 era) 👍.

One minor suggestion is that, I am not sure of the use of the question mark in "cronExpressions": "*/12 * * * * ?" (config.json).

This might be parser-dependent but it is likely deemed invalid on Ubuntu and maybe other distributions with built-in crontab, causing the program to fetch inventory at every second - crontab ignored the leading expression.

Removing the question mark would fix the problem.

"cronExpressions": "*/12 * * * * ?" -> fetches at every second "cronExpressions": "*/12 * * * *" -> fetches at every 12th minute

Maybe a reminder in readme.md would help clear things up.

I suspect this discrepancy stems from the different syntax between Quartz Cron expressions (used in many Java projects) and Linux crontab.

Thanks, I'll add this.

MoshiCoCo avatar Oct 05 '25 05:10 MoshiCoCo

@MoshiCoCo can I fix this issue?

Of course, welcome to submit PR

MoshiCoCo avatar Oct 05 '25 05:10 MoshiCoCo