Hi Diego, On Thu, Dec 12, 2002 at 04:16:03PM -0300, Diego Fernandez wrote:
> I made up a new type of ticket number, > it is composed this way: year.month.day.Counter > The Counter must reset to zero every midnight, so I added a cron to the > crontab. > But my problem is: > What happend if someone store a new ticket at 23:59:59 of 11/12/02 > and it takes to form the ticket number this date. > The cron runs at 00 of 12/12/02. and the Counter is taken after the cron > changes it to 0 then i'll have the ticket number 20021211001, and not the > last ticket of 20021211. > [...] It's easier if you take Ticket/Number/DateChecksum.pm as sample (remove just the checksum stuff). -=> The CounterLog incl. the last modify date (like "counter;date;"). If the date is not the same, the counter starts from 0. Like you want. No cronjob is needed! ,-) > Diego. Martin -- Martin Edenhofer - <martin at edenhofer.de> - http://martin.edenhofer.de/ -- Old programmers never die. They just branch to a new address. _______________________________________________ OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
