-2

I have written the following code to open a particular site.

import webbrowser

webbrowser.open('https://stackoverflow.com/') 

I want to modify the code to ping the website twice a day without being using an always running code in the background (maybe with an infinite loop).

I'm using a Windows 10 system. I don't have root access.

I have done a little research and was unable to find anything satisfactory.

Thanks in advance.

  • 2
    take a look at this SO - https://stackoverflow.com/questions/132971/what-is-the-windows-version-of-cron. – InAFlash Mar 11 '20 at 05:45
  • As you say, you don't have admin rights on this Windows computer. You're probably going to need to talk to the system administrator to see if they have an option for you. – dspencer Mar 11 '20 at 06:07
  • Wanted to know if there is a way around, without the admin access. – Raghvendra Rao Mar 11 '20 at 06:11
  • this might be useful - https://superuser.com/questions/770420/schedule-a-task-with-admin-privileges-without-a-user-prompt-in-windows-7 – InAFlash Mar 11 '20 at 06:14
  • 1
    @InAFlash That question still talks about running with administrator permissions. In this case, Raghvendra doesn't have admin rights on the computer, so won't be able to schedule a task using Task Scheduler. – dspencer Mar 11 '20 at 06:21
  • mybad.. i read it as "with admin rights" – InAFlash Mar 11 '20 at 08:38

3 Answers3

1

You could use github actions - there is a guide here

0

LINUX:

use Crontab or place your script in /etc/rc.local.

WINDOWS:

Use Task scheduler or use AT command similar to crontab in linux.

sk_1995
  • 105
  • 1
  • 7
-1

on Windows you can use Task Scheduler

mike27
  • 7
  • 2