Well Id say writing a cronjob code will be the better idea. Many users here will not be able to set up cronjobs from cpanel, even when I got started 3 years ago it took me a while to figure out. Considering some are actually struggling with ftp, it is a better practice to keep it as simple and convenient for users as possible.
There is a problem with cronjob code though, as they are only executed if a visitor(either human or bot) browses your site. For popular sites, it should not be a problem. For upstart sites, make sure you do not use way too frequent scheduled task at 1min or below.