# Where do the numbers at the beginning of periodic scripts' filenames come from?



## due_speedster (Dec 31, 2019)

I'm working on a port and I need to add a daily periodic script to it. I've noticed that some (but not all) of the scripts that ports install into /usr/local/etc/periodic/daily have numbers at the start of their file names:


```
$ ls -1 /usr/local/etc/periodic/daily/
411.pkg-backup
490.status-pkg-changes
smart
$
```

I see similar behavior in /etc/periodic. I'm guessing that these numbers are to prevent filename collisions between different ports, which would imply that there is some central authority for tracking those numbers (akin to the "UIDs" file in the root of the ports tree). However, if that's the case, I couldn't find any information about it, despite searching the Porter's Handbook, the mailing lists, and this forum.

Can anybody clarify the purpose and source of these numbers? I want to make sure that the work I do in my port will be consistent with whatever convention exists. Thanks for your help!


----------



## SirDice (Dec 31, 2019)

due_speedster said:


> Can anybody clarify the purpose and source of these numbers?


Order, that's all. The scripts are ordered alphabetically, then executed one by one. The numbers allow some control over the order.


----------



## due_speedster (Jan 3, 2020)

Makes sense, thank you.


----------

