Well, this is expected behavior in Oracle. Sequences can generally end up being assigned in what looks like "incorrect" order.
However, there is another issue: how do you know that Task 1 has to be processed before Task 2? I assume these numbers come from sequence, and therefore - as you cannot rely on them being assigned in increasing order - they do not relate to order in which tasks should be processed. I'd expect the tasks to be processed in the order in which they were created, and this is what the timestamp column is for. Simply, for all purposes including task processing, order the tasks by the creation time.
If the order of the task is determined by some external process or property,
you should add a column (say, processing_order), populate this column correctly by the process that creates the tasks and then process the tasks as ordered by this column.
There is another potential issue, which arises independently on the mechanism you use to order the tasks. I'll try to demonstrate this on an example:
Say that you have a process that executes the tasks. This process looks into the database periodically (say, once per second), and if it finds unprocessed tasks there, it picks up the oldest unprocessed tasks, marks it as being executed, and starts the processing. When finished, it marks the task as done and looks for another task.
Now, say that two independent processes create two tasks (let's call them 'A' and 'B') roughly at the same time. Task A was created earlier (and has
lower older timestamp), but for some reason the session that created this tasks commits after the session that created Task B. Accidentally, the executing process starts looking into the database right after the Task B was committed, but before Task A was committed. In this case, the executor will see only unprocessed task B and will start processing it. When done it will look again and see unprocessed Task A, and will process it. Thus, the tasks will end up being processed in order different from their creation times!
There isn't an easy remedy against this situation. If there is some other mechanism that defines order in which tasks should be created, you need to incorporate that mechanism into your data model and task processing mechanism. If there isn't - well, in this case you cannot even decide whether one particular ordering of tasks is wrong or right.