How to make a worldborder that expands every in-game day at dawn?

Solution 1:

Both of these solutions require you to have set up your worldborder first, and to know the location of your spawn chunks (the chunks around your world spawn). They need to be built in the spawn chunks so that they are always loaded.

Simple solution

Place a daylight sensor on top of a command block with the following command:

/worldborder add 2

Make sure the daylight sensor is exposed to daylight. The major downside here is that it is not exactly hidden.

Hidden solution

For a server or just general asthetics, it might be good to hide the command blocks deep underground at bedrock level. Unfortunately, this is a little more complicated, but totally doable.

Create a scoreboard objective called daytime using

/scoreboard objectives add daytime dummy

As pointed out by Skylinerw on the Minecraft forums, daytime does not actually reset to 0 every day. Sleeping in a bed advances the daytime forward to a multiple of 24000 instead of setting it to 0. To make this work, we create a second objective and use it to store a number (24000) in a fake player called "#DAYLIGHT" (The "#" is illegal in player names, making this unique).

/scoreboard objectives add MATH dummy
/scoreboard players set #DAYLIGHT MATH 24000

Now, create a setblock or fill-clock running the following commands.

/time query daytime
/stats block <x> <y> <z> set QueryResult @a daytime
/scoreboard players operation @a daytime %= #DAYLIGHT MATH 
/execute @p[score_daytime=1000,score_daytime_min=1000] ~ ~ ~ worldborder add 2

where <x> <y> <z> are the coordinates of the command block with the first command (relative coordinates using ~ work).

Solution 2:

First place a daylight sensor with a comparator infront of it, with the comparator facing out of the daylight sensor. Then put a command block as the output of the comparator. The redstone should look like following:

Redstone

Then, inside the command block, type:

/worldborder add 2

How this works is that the daylight sensor will activate each day and when it activates, it will give an input to the comparator which will then execute the command inside the command block and add a distance of 2 to the world border.

Solution 3:

Plan 1: (hard&redstone way, no big differences with Plan 2) (not tested)
First of all, you must do a 1 day loop with redstones. And next off, when you connect them to the command block, you must add /worldborder add 2 1 (2 = 2 blocks, 1 = 1 seconds to open) to it.

Plan 2: (easy way) (tested and works)
Put a Daylight Sensor, connect it to a command block, add /worldborder add 2 1 (2 = 2 blocks, 1 = 1 seconds to open) in command block.

Note: Plan 2 might not work, see CommandFox' answer for a better take of this plan.

Plan 3: (tested and works) (world will grow slowly, a new block everymidday)
A minecraft day is 20 minutes. 1200 seconds. So just use this code in console: /worldborder add 2xdays-you-want 1200xdays-you-want. So making this work for 1000 days would be /worldborder add 2000 1200000.

Also if you are mapping, I recommend adding another command block to let the player know that world grew.