crawlab-team / crawlab

Distributed web crawler admin platform for spiders management regardless of languages and frameworks. 分布式爬虫管理平台,支持任何语言和框架
https://www.crawlab.cn
BSD 3-Clause "New" or "Revised" License
11.38k stars 1.8k forks source link

Cron jobs don't kick off at the expected time #1383

Closed DevinSmith69 closed 12 months ago

DevinSmith69 commented 1 year ago

I am having an issue trying to figure out the Cron job's scheduled time. My Crawlab is sitting on a digital ocean droplet and hosted in Amsterdam which is on GMT+2 (same as my timezone). When I schedule the Cron at 16 expecting it to kick off at 16:00 in the afternoon it runs at 08:30 in the morning, I have attempted to kick it off this morning by moving the cron job time every hour and it just doesn't kick off, yet it moves the cron info after the time passes till tomorrow - for example, I attempted to kick it off this morning at 11:00 am, 11:00 came and went and the cron info moved till tomorrow but no task kicked off.

My question is - is the cron info based on your server's time or what would the cron job timezone be so I can adjust accordingly? I am running crawlab v0.6.0

image

tikazyq commented 1 year ago

Hi @DevinSmith69,

I think the cron time is based on your local server time zone and please check your host server's tz config and make sure it aligns with your current time zone.

oyhel commented 1 year ago

For those using docker/docker compose, set the TZ environment variable to fix this. The documentation could benefit from adding this info. I assume it is set to the developers point of origin.

DevinSmith69 commented 1 year ago

Ahhh, thank you @oyhel - think that is my issue - will check it out