I am trying to run a strategy via crontab but the time it is taking to reach the start of the trade function is around 3 seconds.
i am unable to understand what is happening between the execution of crontab command and execution of trade function.
I am executing traade function via following command.
* 0-22 * * * quantrocket moonshot trade my_strategy --accounts DU6359262
class MyStrategy(Moonshot):
...
def trade(self, allocations: dict[str, float], review_date: str = None):
print(time.time())
...
from what i understand is thaat following are the things that are getting executed before execution of my trade function.
quantrocket-houston-1|172.18.0.11 - - [13/Apr/2024:16:52:51 +0000] "GET /ibg1/gateway HTTP/1.1" 200 22 "-" "python-requests/2.27.1"
quantrocket-houston-1|172.18.0.7 - - [13/Apr/2024:16:52:51 +0000] "GET /ibgrouter/gateways?status=running HTTP/1.1" 200 9 "-" "python-urllib3/1.26.8"
quantrocket-houston-1|172.18.0.19 - - [13/Apr/2024:16:53:02 +0000] "GET /history/databases HTTP/1.1" 200 377 "-" "python-urllib3/1.26.8"
quantrocket-houston-1|172.18.0.19 - - [13/Apr/2024:16:53:02 +0000] "GET /realtime/databases HTTP/1.1" 200 49 "-" "python-urllib3/1.26.8"
quantrocket-houston-1|172.18.0.19 - - [13/Apr/2024:16:53:02 +0000] "GET /zipline/bundles HTTP/1.1" 200 28 "-" "python-urllib3/1.26.8"
quantrocket-houston-1|172.18.0.19 - - [13/Apr/2024:16:53:02 +0000] "GET /realtime/databases/ibkr-fx-eurusd-1min HTTP/1.1" 308 327 "-" "python-urllib3/1.26.8"
quantrocket-houston-1|172.18.0.19 - - [13/Apr/2024:16:53:02 +0000] "GET /realtime/databases/ibkr-fx-eurusd-tick/aggregates/ibkr-fx-eurusd-1min HTTP/1.1" 200 104 "-" "python-urllib3/1.26.8"
quantrocket-