Can one ask a non jew before shabbos to do a melocho derabonon on shabbos?
Generally a Jew may not ask a gentile to do melacha for him even if it is only d’rabonon and even before shabbos. However there are certain instances when it would be permitted even on shabbos such as to prevent a significant loss, in a case of need or for the performance of a mitzvah. Aside from this there is another problem when asking a gentile to do melacha, for us on shabbos- the prohibition not to benefit from the work until after shabbos. Therefore, a person should not ask a gentile to do work on shabbos unless they first consulting a Rov.
Shulchan Aruch 306-3,5, 276-1.