I have built a chrome extension that performs a set of actions on a random webpage. The extension seems to work fine and I plan to run it on a VPS running Ubuntu with a XFCE desktop environment. Now the extension needs to perform this tasks on several pages but not concurrently but rather one after the other.

To put it simply, I need to perform the following set of tasks..

1. Cronjob runs (say every minute) and checks if a task is being executed in chrome.

A. No

  • Pull out a website from a mysql stack
  • Start performing the task
  • Extension handles saving the output to the database and updates the flag indicating no tasks are running

B. Yes

  • Do nothing

I have reached to a point where the extension runs manually, but I need to automate this process and have multiple VPS execute similar tasks.


After looking at several methods to carry out my task using crons, I settled for a better alternative which is offered by the chrome extension itself called chrome.alarms.

All I did was create a alarm and made it run every minute

chrome.alarms.create('checkNewTasks', {
    when: 1000,
    periodInMinutes: 1

Works like a charm!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.