Exemplo n.º 1
0
        public void CacheItemRemoved(string k, object v, CacheItemRemovedReason r)
        {
            // do stuff here if it matches our taskname, like WebRequest


            // re-add our task so it recurs
            try
            {
                DateTime moment = DateTime.Now;
                int      day    = moment.Day;
                int      hour   = moment.Hour;


                if (hour == 7)
                {
                    CommonTasks Tasking = new CommonTasks();

                    if (day == 1)
                    {
                        Tasking.AddExpenseToHorseLanders();
                    }

                    Tasking.InsertChecksToMas();

                    Tasking.InsertSchedularToken();
                }
            }
            catch (Exception ex)
            {
            }


            AddTask(k, Convert.ToInt32(v));
        }