As others said, usually the cron job is part of the app itself. If for some reason you want to run some cron task outside the scope of the app, then you can use a script like below and put it in the crontab of your server.
#!/bin/bash
# this is the app's domain name
app="test.smartserver.space"
# detect the container id of the app
container_id=$(docker ps -q -f label=fqdn=$app -f label=isSubcontainer=false)
echo "App container id is : $container_id"
# we can now run arbitrary commands in the container. below we run a command as the www-data user.
docker exec $container_id sudo -u www-data ls -l