Lyonel Posted February 22, 2017 Posted February 22, 2017 Hi guys, Just tried the API scheduler today and I am facing some issues so I was trying to troubleshoot... Here is my config file: conf.json Is there a screen in the admin section where we can see all the custom scheduled API calls? Thanks, Lyonel
Lyonel Posted February 22, 2017 Author Posted February 22, 2017 Figured it out! Many mistakes... I inverted Service and API (not a good start) and my report was in dev status. Also, I forgot to remove the report parameters (as I did not configure them in the config file). All working fine now And as for my question about a screen in the admin section, forget it as I simply did not quite understand how the tool was working
Lyonel Posted February 23, 2017 Author Posted February 23, 2017 Still struggling a bit on this topic with the scheduling... When I use the cron schedule "* * * * * *" it works perfectly. But when I try "0 0 1-31 * * *" it does not. Same with "0,15,30,45 1-23 * * * *" I am using this as a guidance : http://www.nncron.ru/help/EN/working/cron-format.htm Can somebody help me? What am I doing wrong?
Dan Munns Posted February 23, 2017 Posted February 23, 2017 @Lyonel For some reason we have to add a 0 at the beginning of the cron schedule. So ours reads 0 30 07 * * 1-5 for our morning checks (every weekday at 0730) if we drop the leading zero it doesn't work but I cant find a schedule explanation which uses a leading zero anywhere.
Lyonel Posted February 23, 2017 Author Posted February 23, 2017 Thanks @Dan Munns for your reply. So if I wanted something to run every day at midnight I should enter something like "0 0 0 * * 1-5" then? Will give it a try tonight and see tomorrow then.
Dan Munns Posted February 23, 2017 Posted February 23, 2017 @Lyonel yes that looks ok. That should run at 00 00 Monday - Friday. I tend to go with 23 59 or 00 01 for midnight though. Don't ask why, just old habits... 1
Lyonel Posted February 24, 2017 Author Posted February 24, 2017 @Dan Munns thanks again for your input It worked like a charm last night. That being said, if someone from Hornbill is reading this post, I think they might want to clarify which cron schedule format should be used on the description page of the API scheduler on git hub...
Lyonel Posted February 24, 2017 Author Posted February 24, 2017 13 minutes ago, Lyonel said: @Dan Munns thanks again for your input It worked like a charm last night. That being said, if someone from Hornbill is reading this post, I think they might want to clarify which cron schedule format should be used on the description page of the API scheduler on git hub... Actually found the right information on Github! I was being silly but basically all we need to know is here: https://github.com/hornbill/cron https://godoc.org/github.com/robfig/cron Here is the format to use for the API Scheduler; Quite different to what I was following, which explains my troubleshooting issues. It also explains the leading "0" @Dan Munns as it corresponds to seconds. I hope this post will be useful to other adventurous Hornbill users
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now